AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Comunicación / Gestión de correos electrónicos
  • POP3 and SMTP protocols
  • Authenticated SMTP
  • Timeout
  • Gmail: What should I do if a connection to Gmail (SMTP, IMAP, POP3) fails due to a certificate error?
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Starts a session for managing emails via the POP3 protocol.
Note To open an e-mail reading session (via POP3 protocol only), use the EmailStartPOP3Session function.
Ejemplo
MyPop3Session is emailPOP3Session
...
// Start a session to send an email using the POP3 protocol
IF MyPop3Session.StartSession() = True THEN
UserName = MyPop3Session..Name
ELSE
UserName = ""
Error("Unable to establish the connection")
END
Sintaxis

Iniciar una sesión de correo electrónico POP3 Ocultar los detalles

<Result> = <POP3 session>.OpenSession()
<Result>: booleano
  • True if the session was started,
  • False otherwise. If an error occurs, the ErrorOccurred variable is set to True.
    To get more details on the error, use ErrorInfo with the errMessage constant.
<POP3 session>: Variable de tipo emailPOP3Session
Name of the emailPOP3Session variable corresponding to the email session to handle.
Observaciones

POP3 and SMTP protocols

The different parameters passed to <emailPOP3Session variable>.StartSession are supplied by the Internet Service Provider or by the network administrator.
An Internet connection is required to manage the emails. Several cases may occur:
  • The user uses a direct connection to Internet (cable or ADSL): no specific operation required.
  • The user uses a modem to connect to the Internet: the NetOpenRemoteAccess function opens the Internet connection.
By default, if only the IP address of POP3 server is specified, this address will be used by the email server that uses SMTP. The IP address of SMTP protocol must be specified only if the POP3 account and the SMTP account do not use the same computer.

Authenticated SMTP

The SMTP authentication cannot be performed by <emailPOP3Session variable>.StartSession. To start a POP3 session and an authenticated SMTP session at the same time, you must use both EmailStartPOP3Session and EmailStartSMTPSession.

Timeout

The timeout can be set using EmailSetTimeOut.

Gmail: What should I do if a connection to Gmail (SMTP, IMAP, POP3) fails due to a certificate error?

Since the end of August 2017, Google has deployed a new certificate: Google Internet Authority G3. Unfortunately, the Windows API for checking certificates does not validate this certificate.
Therefore, starting a POP3, IMAP or SMTP session may fail with the error "The certificate string was not issued by a trusted authority".
To validate the certificate, all you have to do is modify the management mode of emails. The WLanguage EmailConfigure function allows you to change this mode and to no longer use the Windows API that locks this certificate. The following code must be added before starting the session via <emailPOP3Session variable>.StartSession:
// Enable the multi-platform implementation
EmailConfigure(emailParameterMode, 1)
Remarks:
  • As of version 23 Update 1, you no longer need to call the EmailConfigure function: WLanguage automatically uses the email management mode appropriate to the session.
  • You can handle certificate errors on an SMTP session using the IgnoreError property of a variable of type emailSMTPSession.
Componente: wd300com.dll
Versión mínima requerida
  • Versión 24
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 25/02/2025

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