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: Closing an email session that is using the POP3/SMTP protocol
  • Example: Closing an email session via MS Exchange
EmailCloseSession (Example)
Example: Closing an email session that is using the POP3/SMTP protocol
The following code is used to send an email by using the SMTP protocol. The characteristics of the POP3/SMTP protocol have been specified using EmailOuvreSession (POP3 server address, SMTP server address, etc.).
The session is closed when the email is sent.
IF EmailStartSession(USER, PASSWORD, "pop3.server.com", ...
"smtp.server.com") = True THEN
  UserName = USER
ELSE
  UserName = ""
  Error("Unable to establish the connection")
END
 
// Initializes the email components
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
 
// Sends the email
IF EmailSendMessage(UserName) = False THEN
  Error()
END
...
EmailCloseSession(UserName)
Example: Closing an email session via MS Exchange
WINDEVWEBDEV - Código ServidorReportes y ConsultasCódigo de Usuario (UMC)Ajax The following code is using MS Exchange to send an email. A profile ("PROFILE_Example") was created in MS Exchange. For more details on how to create profiles, see EmailStartSession.
The session is closed when the email is sent.
EmailID is int
EmailID = EmailStartSession("PROFILE_Example")
// Initialize the variables
Email.NbRecipient = 1
Email.Recipient[1] = "windev@windev.com"
Email.NbAttach = 0
Email.Message = ""
// Send the message to MS Exchange
EmailSendMessage(EmailID)
...
EmailUpdate(EmailID)
...
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