ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Communication / Managing emails
  • Properties specific to emailPOP3Session variables
  • Functions that use emailPOP3Session variables
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
The emailPOP3Session type is used to access a messaging server by using the POP3 protocol (Post Office Protocol) in order to retrieve the messages found on this server. You can define and change the characteristics of the connection using different WLanguage properties.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
// Start a POP3 session
MySession is emailPOP3Session
MySession.ServerAddress = "pop.mydomain.fr"
MySession.Name = "user"
MySession.Password = "secret"
EmailStartSession(MySession)

// Retrieve all the messages
arrMessage is array of Email 
arrMessage = EmailGetAll(MySession)

// Browse the array of messages by index
FOR I = 1 _TO_ MySession.EmailByIndex.Count
	Trace(MySession.EmailByIndex[I].Subject)
END

// Browse the array of messages with a FOR EACH loop
FOR EACH AMessage OF MySession
	Trace(AMessage.Subject)
END
Properties

Properties specific to emailPOP3Session variables

The following properties can be used to handle emailPOP3Session variables:
Property name Type used Effect
ServerAddressCharacter stringAddress of email server. This address is supplied by the service provider or by the network administrator. This address can be specified as follows:
  • IP address (in XXX.XXX.XXX.XXX format, 125.5.110.100 for example).
  • Name of server (pop3.free.fr for example). This syntax is recommended.
PasswordCharacter string or Secret stringUser password. This password is given by the service provider or by the network administrator.
New in version 2025
Secret strings: If you use the secret string vault, the type of secret string used for this parameter must be "Ansi or Unicode string".
To learn more about secret strings and how to use the vault, see Secret string vault.
AndroidAndroid Widget Secret strings are not available for this parameter in Android/Android widget applications.
NameCharacter stringIdentifies the user. This name is supplied by the service provider or by the network administrator.
OptionInteger constantThe possible values are:
  • emailOptionDefault (default): Connection using POP3 protocol.
  • optionTLS: Connection using POP3 protocol inside a TLS tunnel. This option guarantees confidentiality, but must be supported by the server.
    Before version 28 Update 4, this constant was named optionSSL .
PortIntegerIdentifies the port used for the POP3 protocol.
This property is set to 110 by default, corresponding to the number of standard port for this protocol.
Remark: To use the SSL protocol, it is necessary to specify the port number. In most cases, the email servers expect the SSL connections on port 995.
Remarks

Functions that use emailPOP3Session variables

EmailCloseSessionCloses an email management session depending on the selected mode (SMTP/POP3, IMAP, MS Exchange or Lotus Notes).
EmailDeleteMessageDeletes the current email using the current protocol (POP3, IMAP, MS Exchange, Lotus Notes or Outlook).
EmailGetAllRetrieves all the emails found on a server.
EmailMessageLengthCalculates the size of specified message (without loading the message).
EmailNbMessageReturns the number of incoming messages currently found:
  • on the email server (POP3 protocol only).
  • in the Outlook messaging software.
EmailReadFirstReads the first incoming email according to the protocol used (POP3 or IMAP, MS Exchange, Lotus Notes or Outlook).
EmailReadFirstHeaderReads the header of the first incoming email according to the protocol used (POP3 or IMAP, Lotus Notes or Outlook).
EmailReadLastReads the last incoming email according to the protocol used (POP3 or IMAP, MS Exchange, Lotus Notes or Outlook).
EmailReadLastHeaderReads the header of the last email received, depending on the protocol used (POP3 or IMAP, Lotus Notes or Outlook)..
EmailReadMessageReads an incoming according to the protocol used (POP3 or IMAP, Lotus Notes or Outlook).
EmailReadMessageHeaderReads the header of an incoming email according to the protocol used (POP3 or IMAP, Lotus Notes or Outlook).
EmailReadNextReads the incoming email found after the current email according to the protocol (POP3 or IMAP, MS Exchange, Lotus Notes or Outlook).
EmailReadNextHeaderReads the header of the email found after the current email according to the protocol used (POP3 or IMAP, Lotus Notes or Outlook).
EmailReadPreviousReads the email found before the current email according to the protocol used (POP3 or IMAP, MS Exchange, Lotus Notes or Outlook).
EmailReadPreviousHeaderReads the header of the email found before the current email according to the protocol used (POP3 or IMAP, Lotus Notes or Outlook).
EmailStartSessionStarts an email management session based on the selected management mode (POP3, SMTP, IMAP or MS Exchange).
Related Examples:
WD Mail Complete examples (WINDEV): WD Mail
[ + ] This application is an email client developed in WINDEV. It is based on the Email objects.
This email client is used to retrieve and send emails by using the POP, IMAP and SMTP protocols.
You have the ability to apply filters to the incoming emails.

The application can also be used to manage several email accounts. The writing of an email is based on the HTML edit control.
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 11/23/2024

Send a report | Local help