PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • The management of emails
  • Synchronous/Asynchronous mode
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
Overview
WINDEV, WEBDEV and WINDEV Mobile allow you to directly manage the emails from your applications. Sending and receiving emails are simplified by:
Versions 17 and later
iPhone/iPad This feature is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This feature is now available for the iPhone/iPad applications.
iPhone/iPad This feature is now available for the iPhone/iPad applications.
Versions 21 and later
Universal Windows 10 App This feature is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This feature is now available in Universal Windows 10 App mode.
Universal Windows 10 App This feature is now available in Universal Windows 10 App mode.
Versions 22 and later
Android This feature is now available for the Android applications.
Android Widget This feature is now available in Android Widget mode.
LinuxAndroidAndroid Widget iPhone/iPad The SSL connections are now supported (for a secure POP3, SMTP or IMAP server).
New in version 22
Android This feature is now available for the Android applications.
Android Widget This feature is now available in Android Widget mode.
LinuxAndroidAndroid Widget iPhone/iPad The SSL connections are now supported (for a secure POP3, SMTP or IMAP server).
Android This feature is now available for the Android applications.
Android Widget This feature is now available in Android Widget mode.
LinuxAndroidAndroid Widget iPhone/iPad The SSL connections are now supported (for a secure POP3, SMTP or IMAP server).
The management of emails
Several methods can be used to manage the emails:
  • Management via the POP3, IMAP and SMTP protocols:
    • the POP3 protocol: this protocol for receiving emails is recognized by all the service providers. This protocol allows you to directly communicate with the server, available at your ISP. This protocol is used to list the incoming messages and to read them.
    • Versions 15 and later
      the IMAP protocol: this protocol for receiving emails allows you to leave the emails on the server so that they can be viewed from different messaging clients or webmail. Several characteristics associated with the emails can be managed.
      New in version 15
      the IMAP protocol: this protocol for receiving emails allows you to leave the emails on the server so that they can be viewed from different messaging clients or webmail. Several characteristics associated with the emails can be managed.
      the IMAP protocol: this protocol for receiving emails allows you to leave the emails on the server so that they can be viewed from different messaging clients or webmail. Several characteristics associated with the emails can be managed.
    • the SMTP protocol: this protocol for sending emails is recognized by all the service providers.
  • Management via Lotus Notes, Outloook or MS Exchange:
    • the "Simple Mail API API (also called SMAPI or Simple MAPI)": this management mode of emails is used by most of the Microsoft applications and mainly the MS Exchange client.
    • the Lotus Notes or Outlook messaging software: these programs allow you to send and receive emails.
Notes:
  • Windows Mobile On a Mobile device (Pocket PC), the API used is the "CEMAPI" API. This management mode of emails allows you to use Pocket Outlook for sending and receiving emails.
  • WEBDEV - Browser code WEBDEV also allows you to use the messaging software of the Web user. This method simplifies the sending of emails from a WEBDEV site. Indeed, a single function (EmailOpenMail) is required to open this software on the computer of the Web user and to fill the email information.
  • LinuxJava Only the POP3 and SMTP protocols are available.
  • AndroidAndroid Widget The management via Lotus Notes, Outlook or MS Exchange is not available.
  • LinuxiPhone/iPadWindows MobileUniversal Windows 10 App The SSL connections are not supported (for a secure POP3, SMTP or IMAP server).
  • Windows MobileUniversal Windows 10 App The SSL connections are not supported (for a secure POP3, SMTP or IMAP server).
WEBDEV - Server code
Synchronous/Asynchronous mode
The Email functions are locking functions by default (in Windows and Linux). Which means that no other code can be run during their execution. The program will resume only when the current Email functions have been run.
WEBDEV gives you the ability you to manage the emails in asynchronous mode. This mode allows your sites to send emails without locking the other processes.
To use the asynchronous mode, you must:
  1. Uncheck "Disable the email spooler" in the WEBDEV administrator ("Configuration" tab).
  2. Enable the asynchronous mode when starting the SMTP session (with EmailStartSMTPSession or EmailStartSession).
  3. All the outgoing emails will be transmitted to a "spooler". The emails are queued up before they are sent.
The execution of Email functions do not lock the rest of your program anymore. EmailStatus is used to find out the email status.
Note: If the WEBDEV administrator is closed, the email spooler is cleared: the pending emails are not sent and they are removed form the spooler.
If "Disable the email spooler" is checked while emails are still found in the spooler, these emails will not be lost: the administrator keeps sending them but no new email is accepted by the spooler.
Caution: The asynchronous mode can only be used when starting a session on an SMTP server (EmailStartSMTPSession for sending emails or EmailStartSession). The asynchronous mode is ignored in all the other cases.
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.
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 (WEBDEV): Sending emails
[ + ] This training example explains how to send emails with WEBDEV.
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.
The POP3 Email functions Unit examples (WINDEV): The POP3 Email functions
[ + ] Using the Email functions to manage the POP3 protocol.
This protocol is used to retrieve emails from a server.
WD JavaMail Training (WINDEV): WD JavaMail
[ + ] This example is a Java example used to create an applet.
This applet can then be used in an Internet page.
This applet enables you read and send emails.
In this project, a second configuration enables you to manage a "Standard" Java application (.jar).
To generate the Java applet and the "Standard" Java application, select "Workshop - Java - Generate the Java archive",
for each one of the two configurations of project.
WD POP3Proxy Complete examples (WINDEV): WD POP3Proxy
[ + ] This example presents a POP3 proxy. A proxy is a program that connects to a server on behalf of another program.
A proxy can be used to isolate a local network from Internet for security reasons for example.
Only the computer hosting the proxy is linked to Internet and the users access the email server via the proxy.
In this example, the proxy is used to automatically archive the retrieved emails into a HFSQL database.
Several additional features can be used in this application: automatic filtering of spams, statistics about the emails...
Pocket Managing Contacts Mobile (WINDEV Mobile): Pocket Managing Contacts
[ + ] This example presents the management of contacts in Pocket PC.
The following topics will be presented in this example:
1/ the loopers
2/ the use of queries
3/ sending SMSs
4/ sending emails
5/ the phone call.
WW_CMS Complete examples (WEBDEV): WW_CMS
[ + ] This example is an example of CMS (Content Management System).
This is a site for content management, typically a site for displaying some articles.

This example is divided into 2 parts:
- An AWP part for the part that must be referenced
- A WEBDEV part for the management part

Note:
In order for some features of the example to operate (sending emails for example), the parameters must be modified in order to adapt them to your configuration.
These parameters are stored as constants defined in the code of the project.
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment