PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Time-out
  • Required application feature
  • Gmail: What to do if a connection to Gmail (SMTP, IMAP, POP3) fails with a certificate error?
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Starts a session for receiving and reading emails with the IMAP protocol. You will only be able to read the emails. You have the ability to start a secure IMAP session via SSL.
Note: To start a session for sending emails, use EmailStartSMTPSession.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Versions 22 and later
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
New in version 22
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
Example
// Read an email via the IMAP protocol
IF EmailStartIMAPSession(EDT_USER, EDT_PASSWORD, ...
"imap.mydomain.fr") = True THEN
ProcessIncomingEmails()
ELSE
Error("Unable to establish the connection")
END
Syntax
<Result> = EmailStartIMAPSession(<User Name> , <Password> , <Server Address> [, <Port> [, <Option>]])
<Result>: Boolean
  • True if the session was started,
  • False otherwise. To find out the error details, use ErrorInfo.
<User Name>: Character string (with quotes)
User name on the server. This name is supplied by the service provider or by the network administrator. This name will be used to identify the email session in the different functions for email management.
<Password>: Character string (with quotes)
User password. This password is given by the service provider or by the network administrator.
<Server Address>: Character string (with quotes)
Address of email server (incoming protocol). This address is supplied by the service provider or by the network administrator. This address can be given in the following format:
  • IP address in XXX.XXX.XXX.XXX format (192.168.1.1 for example).
  • IP address containing the server name (imap.mydomain.fr for example). This syntax is recommended.
  • IP address returned by NetIPAddress.
Note: The address must be a IPv4 address.
<Port>: Optional integer
Identifies the port used for the IMAP protocol (143 by default).
<Option>: Optional Integer constant
Used to specify whether an SSL connection is required:
emailOptionDefault
(Default value)
Non-secure connection.
optionSSLSSL connection required (for a secured IMAP server).
Note: In most cases, the port used for a secured IMAP server is port 993 (instead of port 143, the default port value).
LinuxAndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 App This constant is not available.
Windows MobileUniversal Windows 10 App This constant is not available.
Remarks

Time-out

The time-out can be configured by EmailSetTimeOut.
Versions 21 and later
Universal Windows 10 App

Required application feature

The use of this function triggers the declaration of an application feature in the wizard for generating the application.
Required feature: Family and corporate networks
This feature allows the applications to use incoming and outgoing accesses to the family and corporate networks.
New in version 21
Universal Windows 10 App

Required application feature

The use of this function triggers the declaration of an application feature in the wizard for generating the application.
Required feature: Family and corporate networks
This feature allows the applications to use incoming and outgoing accesses to the family and corporate networks.
Universal Windows 10 App

Required application feature

The use of this function triggers the declaration of an application feature in the wizard for generating the application.
Required feature: Family and corporate networks
This feature allows the applications to use incoming and outgoing accesses to the family and corporate networks.

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

Since August 2017, a new certificate was deployed by Google: 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 EmailStartIMAPSession:
// Enable the multi-platform implementation
EmailConfigure(emailParameterMode, 1)
Note: From version 23 Update 1, the call to EmailConfigure is not required anymore: WLanguage is automatically using the management mode of emails adapted to the session.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230com.dll
Windows Mobile wp230com.dll
Linux wd230com.so
Android wd230android.jar
Minimum required version
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment