IMAP4 Client
VAST contains a powerful IMAPv4 client which can be used to manage a session to retrieve email from machines with an IMAPv4 compliant service.
An IMAP client requires an IMAP URL of the following form:
Non-secure Client: ‘imapl://<imap server address>’
Secure Client: ‘imapsl://<imap server address>’
A minimal example to list unread emails from the inbox folder looks like the following:
client := SstImap4Client forUrl: ‘imapsl://<imap server address>’.
client login: ‘username’ -> ‘password’;
searchResult := client search: (client newSearchBuilder notSeen).
fetchResult := client fetch: (client newFetchBuilder messages: searchResult uniqueIds; rfc822Text).
client logout.
The easiest way to learn how to use the IMAP client is by running the examples found in the <SstImap4ClientExample> class of the <SstEmailExamples> application. The examples require an imap url and user/pass credentials.
(SstImap4ClientExample
forUrl: 'imapsl://<smtp server address>’
user: 'username’
pass: 'password')
exampleFetch1;
…
•
Last modified date: 04/20/2020