ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Rich Text Area control
  • Connecting to an IMAP server by using an emailIMAPSession variable
  • Connecting to a secure SMTP server
EmailStartSession (Example)
Connecting to an IMAP server by using an emailIMAPSession variable
// The IMAP account is defined at gMail
gIMAPSession is emailIMAPSession
gIMAPSession.ServerAddress = "imap.gmail.com"
gIMAPSession.Name = "user@gmail.com"
gIMAPSession.Password = "secret"
gIMAPSession.Port = 993
gIMAPSession.Option = optionTLS

// Start the gMail session
IF EmailStartSession(gIMAPSession) = False THEN
	// Failed to open
	ErrorInfo(errFullDetails)
END
Connecting to a secure SMTP server
// It is a gMail server in this example

// Secure SMTP session
gSMTPSession is emailSMTPSession
gSMTPSession.ServerAddress = "smtp.gmail.com"
gSMTPSession.Name = "user@gmail.com"
gSMTPSession.Password = "secret"
gSMTPSession.Port = 587
gSMTPSession.Option = emailProtocolSMTPS

// Start the session
IF EmailStartSession(gSMTPSession) = False THEN
	Error(ErrorInfo(errFullDetails))
END
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/25/2025

Send a report | Local help