|
|
|
|
|
- Overview of IMAP protocol
- Using the IMAP protocol
- Receiving messages by using the IMAP protocol
- Remarks
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. Remarks: Receiving messages by using the IMAP protocol To receive emails by using the IMAP protocol - Start an IMAP session by using an emailIMAPSession variable and EmailStartSession.
Example for starting a session by using an emailIMAPSession variable:
MaSession is emailIMAPSession
MaSession.ServerAddress = "pop.masociete.fr"
MaSession.Name = "utilisateur"
MaSession.Password = "secret"
EmailStartSession(MaSession)
- Read the messages on the messaging server:
- with the EmailGetAll function.
- with a loop such as:
Example that uses an Email variable:
MonMessage is Email
EmailReadFirst(MaSession,MonMessage)
WHILE NOT MonMessage.Out
...
EmailReadNext(MaSession, MonMessage)
END
Example that uses the Email structure:
EmailReadFirst(MaSession)
WHILE NOT Email.Out
...
EmailReadNext(MaSession)
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):
MonMessage is Email
FOR EACH MonMessage NOT READ OF MaSession
...
END
- Close the IMAP session with EmailCloseSession.
Related Examples:
|
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.
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|