|
|
|
|
|
- Managing the error when sending an email via the POP3 protocol
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, "pop3.ifrance.fr", "smtp.ifrance.fr") = True THEN Â UserName = USER ELSE Â UserName = "" Â Error("Unable to establish the connection") END // Initializes the components of the email Email.Sender = "<user@pcsoft.fr>" // 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 Â Error(EmailMsgError(Email.Error)) END ... EmailCloseSession(UserName)
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|