ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Communication / Managing emails
  • Email management functions
  • Types of variables associated with the management of emails
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Remark: These functions are also available in prefix syntax (Functions for managing emails (prefix syntax)).
Email management functions
CloseSessionCloses a session with Lotus Notes or Outlook.
EmailAddFolderAdds a folder into the messaging software (Outlook, messaging software using the IMAP protocol (Internet Message Access Protocol), ...).
EmailBuildSourceGenerates the source code of the email message to be sent from the variables in the Email structure or in an Email variable.
EmailChangeFolderModifies the current folder in the messaging software (Outlook, messaging software using the IMAP protocol, ...).
EmailChangeStatusChanges the status of an email on a messaging server.
EmailCheckAddressChecks the validity of an email address.
EmailCloseSessionCloses an email management session depending on the selected mode (SMTP/POP3, IMAP, MS Exchange or Lotus Notes).
EmailConfigureUsed to configure WLanguage email management functions.
EmailCopyCopies an email found in a directory to another directory of an IMAP server.
EmailCurrentFolderReturns the name of current folder in the messaging software (Outlook, messaging software using the IMAP protocol (Internet Message Access Protocol), ...).
EmailDeleteMessageDeletes the current email using the current protocol (POP3, IMAP, MS Exchange, Lotus Notes or Outlook).
EmailExportHTMLRetrieves the HTML code of an email to display it in an HTML control (HTML control, HTML Display control, etc.).
EmailExpungeDestroys all the deleted emails marked as deleted ("Deleted" status) from the current folder of IMAP session.
EmailGetAllRetrieves all the emails found on a server.
EmailGetIndicatorRetrieves the indicators defined on an email of IMAP session.
EmailGetTimeOutReads the value of the "timeout" for connecting to the SMTP, POP3 and IMAP messaging servers.
EmailImportHTMLImports, into the Email structure or into an Email variable, the content of an HTML file in order to send it by email.
EmailImportSourcePopulates an Email variable using the content of its Source property or the different variables of the email structure using the content of the Email.Source variable.
EmailListFolderReturns the list of folders:
  • found in the Outlook messaging software.
  • for an IMAP session.
EmailLoadAttachmentAdds an attached file to an email.
EmailMessageLengthCalculates the size of specified message (without loading the message).
EmailMsgErrorReturns the message corresponding to the error identifier.
EmailNbMessageReturns the number of incoming messages currently found:
  • on the email server (POP3 protocol only).
  • in the Outlook messaging software.
EmailProgressBarManages a progress bar while sending and receiving emails.
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 last incoming email according to 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).
EmailRemoveFolderDeletes a folder from the Outlook messaging software or from an IMAP server.
EmailResetResets all the variables of the email structure or all the variables of an Email variable.
EmailRunAppStarts the native application for sending emails found on the current computer:
  • Computer running Windows,
  • Mobile device (Android, iPhone, iPad).
EmailSaveAttachmentCopies the attachment of current email onto the user computer (locally).
EmailSeekFirstFinds one or more emails according to the criteria specified in the messaging software (Outlook, messaging software using the IMAP protocol, ...).
EmailSeekFirstNotesSeeks one or more emails according to specified criteria, in a local or remote Lotus Notes or Domino database.
EmailSendSends an email via the SMTP protocol while controlling the "buffer" of the email.
EmailSendMessageSends an email using a given protocol (SMTP, MS Exchange, Lotus Notes, Outlook).
EmailSetTimeOutChanges the value of the "timeout" for connecting to the SMTP, POP3 and IMAP messaging servers.
EmailStartIMAPSessionStarts a session for receiving and reading emails with the IMAP protocol.
EmailStartNotesSessionAllows you to access the data handled by the Lotus Notes messaging (emails, contacts, groups of contacts, tasks, appointments).
EmailStartOutlookSessionAllows you to access data handled by the Outlook messaging software (emails, contacts, groups of contacts, tasks, appointments and folders).
EmailStartPOP3SessionStarts a session for receiving and reading emails with the POP3 protocol.
EmailStartSessionStarts an email management session based on the selected management mode (POP3, SMTP, IMAP or MS Exchange).
EmailStartSMTPSessionStarts a session for sending emails with the SMTP protocol.
EmailStatusReturns the status of an email sent via an SMTP session started in asynchronous mode.
EmailUpdateUpdates the messages of MS Exchange according to the email server.
OutlookDefaultProfileRetrieves the default profile defined in Outlook.
OutlookListProfileLists the available Outlook profiles.
OutlookStartSessionAllows you to access data handled by the Outlook messaging software (emails, contacts, groups of contacts, tasks, appointments and folders).
Types of variables associated with the management of emails
EmailThe Email type is used to handle the email content as well as the associated information.
emailAttachThe emailAttach type is used to handle an attachment.
emailIMAPSessionThe emailIMAPSession type is used to access a messaging server by using the IMAP protocol (Internet Access Message Protocol) in order to retrieve the messages found on this server.
emailNotesSessionThe emailNotesSession type is used to access a Lotus Notes messaging server in order to retrieve the messages found on this server and to send messages.
emailOutlookSessionThe emailOutlookSession type is used to handle the Outlook messaging software (emails, contacts, groups of contacts, tasks, appointments and folders).
emailPOP3SessionThe 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.
emailSMTPSessionThe emailSMTPSession type is used to access a messaging server by using the SMTP protocol (Simple Mail Transfer Protocol) in order to send emails.
Related Examples:
Sending an email in HTML format Unit examples (WINDEV): Sending an email in HTML format
[ + ] Using the WLanguage "EmailImportHTML" function.
This function is used to import an HTML file into the email structure. This allows you to easily add images into the emails.
WD Managing Contacts Complete examples (WINDEV): WD Managing Contacts
[ + ] This example presents the management of contacts in WINDEV.
The following topics are presented in this example:
1/ the loopers
2/ the label reports
3/ the queries
4/ sending emails
5/ using Outlook
6/ handling the data found on a mobile device.
Summary of the example supplied with WINDEV:
This example is used to manage the contacts and to send emails.
It also enables you to synchronize these contacts with the ones found on the mobile device connected to the PC and with the ones found in Outlook.
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.
WD Mailshot Training (WINDEV): WD Mailshot
[ + ] This example explains how to send a mailshot with WINDEV.

This example is used to type the subject of the message, its content and its attachments.
Then, the user must select the customers to which the message will be sent.
The WLanguge EmailSendMessage() function is used to send the message to each selected customer.
Technical implementation:
An email server compatible with POP3/SMTP must necessarily be accessible from the computer on which the application is run.
Sending emails Unit examples (WINDEV): Sending emails
[ + ] Sending emails with WINDEV.
Sending emails Unit examples (WEBDEV): Sending emails
[ + ] This training example explains how to send emails with WEBDEV.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/10/2024

Send a report | Local help