PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview of IMAP protocol
  • Using the IMAP protocol
  • Receiving messages by using the IMAP protocol
  • Specific features in WINDEV
  • Specific features in WINDEV Mobile
  • Specific features in WEBDEV
  • Notes
  • Connection to the service provider
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 of IMAP protocol
The IMAP protocol is a standard protocol for managing emails. Unlike the POP3 protocol, the principle for using the IMAP protocol consists in leaving the messages on the messaging server in order to read them from several clients. It includes a specified indicator used to find out whether a message was read. Several messaging servers support both the IMAP protocol and the POP3 protocol.
Notes:
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 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.
Using the IMAP protocol

Receiving messages by using the IMAP protocol

To receive emails by using the IMAP protocol
  1. Start an IMAP session by using an emailIMAPSession variable and EmailStartSession.
    Example for starting a session by using an emailIMAPSession variable:
    // Start the messaging session
    MySession is EmailIMAPSession
    MySession..ServerAddress = "pop.mycompany.us"
    MySession..Name = "user"
    MySession..Password = "secret"
    EmailStartSession(MySession)
  2. Read the messages on the messaging server:
    • with EmailGetAll,
    • with a loop such as:
      Example that is using an Email variable:
      MyMessage is Email
      EmailReadFirst(MySession,MyMessage)
      WHILE NOT MyMessage..Out
      // Place the process of the message read...
      ...

      EmailReadNext(MySession, MyMessage)
      END

      Example that is using the Email structure:
      EmailReadFirst(MySession)
      WHILE NOT Email.Out
              // Place the process of the message read...
              ...
              
              EmailReadNext(MySession)
      END
    • or with a loop such as (the "NOT READ" keywords are optional and they allow you to browse only the unread messages or all the messages):
      MyMessage is Email
      FOR EACH MyMessage NOT READ OF MySession
              // Place the process of the message read...
              ...
      END
  3. Close the IMAP session with EmailCloseSession.
WINDEV

Specific features in WINDEV

You may have to establish a connection by modem before starting the IMAP session.
Windows Mobile

Specific features in WINDEV Mobile

If the Pocket PC is not equipped with an Ethernet card or a GPRS modem, the Pocket PC must be connected to a PC to manage the emails.
This connection allows the Pocket PC to share the Internet connection of the PC.
No specific setting is required in ActiveSync.
WEBDEV - Server code

Specific features in WEBDEV

In a WEBDEV site, the messages are received by the Application Server.
Notes
WINDEVWINDEV Mobile

Connection to the service provider

WINDEV An Internet connection is required to manage the emails. Several cases may occur:
  • The user is using a modem to connect to Internet: NetOpenRemoteAccess is used to establish the connection to Internet.
  • The user is using a direct connection to Internet (cable or ADSL): no specific operation is required.
WINDEV Mobile No specific operation is required to connect to the service provider.
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 required version
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment