|
|
|
|
|
- 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)
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|