ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE


  • Reading the last email received in the POP3 mailbox
EmailReadLast (Example)
Reading the last email received in the POP3 mailbox
The following code is used to read the last incoming email. The user can choose to display the email content in the "WIN_Email_RCV" window.
IF EmailStartSession(USER, PASSWORD, "pop3.yahoo.com", ...
"smtp.yahoo.com") = True THEN
UserName = USER
ELSE
UserName = ""
Error("Unable to establish the connection")
END
...
// Read the last incoming record
IF EmailReadLast(UserName) = True THEN
// Check the existence of the email
IF Email.Out = False THEN
IF YesNo("You have received an email from" + Email.Sender + ...
"Do you want to read it?") = True THEN
// Open the window used to read the email
Open(WIN_Email_RCV)
END
ELSE
Info ("No email")
END
ELSE
// Display the error that occurred when reading the email
Error()
END
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment