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.
|