Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Rich Text Area control
  • Managing the error when sending an email via the POP3 protocol
EmailMsgError (Example)
Managing the error when sending an email via the POP3 protocol
The following code is used to send an email via the POP3 protocol. The characteristics of the POP3 protocol have been specified by EmailStartSession (address of the POP3 server, address of the SMTP server, etc.).
If an error occurs, the full error message is displayed. The session is closed when the email is sent.
// Start the email session
IF EmailStartSession(USER, PASSWORD, "", "") = True THEN
  UserName = USER
  UserName = ""
  Error("Unable to establish the connection")
// Initializes the components of the email
Email.Sender = "<>" // The sender
Email.Recipient[1] = RECIPIENT // The recipient
Email.NbRecipient = 1     // The number of recipients
Email.Subject = SUBJECT          // The subject
Email.Message = TEXT        // The body of the message
Email.NbAttach = 0          // The number of attachments
// Send the email
IF EmailSendMessage(UserName) = False THEN
Minimum version required
  • Version 9
This page is also available for…
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help