AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / Desarrollar una aplicación o un sitio web / Controles, ventanas y páginas / Controles: tipos disponibles / Control Área de texto enriquecido
  • Example 1: Reading the incoming emails via the POP3 protocol
  • Example 2: Reading the incoming emails via MS Exchange
EmailReadNext (Example)
Example 1: Reading the incoming emails via the POP3 protocol
The following code is used to read the incoming emails found in the mailbox of the POP3 protocol. These emails are read from the first one to the last one and they are displayed in the "TABLE_Email" table. The characteristics of the POP3 protocol have been specified by EmailStartSession (address of the POP3 server, address of the SMTP server, etc.).
// Start the email session
IF EmailStartSession(USER, PASSWORD, "pop3.server.com", ...
"smtp.server.com") = True THEN
  UserName = USER
ELSE
  UserName = ""
  Error("Unable to establish the connection")
END
// Fill a table with the incoming emails
EmailReadFirst(UserName)
WHILE Email.Out = False
  TableAdd(TABLE_Email, Email.Sender + TAB + Email.Subject)
  EmailReadNext(UserName)
END
Example 2: Reading the incoming emails via MS Exchange
Procedimientos almacenados
The following code is using MS Exchange to read the new incoming emails. These emails are found in the in-box of MS Exchange and on the server. A profile ("PROFILE_Example") was created in MS Exchange. For more details on how to create profiles, see EmailStartSession.
EmailID is int
// Start the email session
EmailID = EmailStartSession("PROFILE_Example")
// Retrieve the messages in the in-box of MS Exchange
EmailUpdate(EmailID)
// Browse the new incoming messages from the first one to the last one
EmailReadFirst(EmailID, "NOT READ")
WHILE Email.Out = False
IF YesNo("You have received an email from" + Email.Sender + ...
"Do you want to read it?") THEN
// Open the window for reading messages
Open(WIN_Email_RCV)
ELSE
EmailReadNext(EmailID, "NOT READ")
END
END
...
EmailCloseSession(EmailID)
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/05/2022

Señalar un error o enviar una sugerencia | Ayuda local