« Xojo Consulting in Ge… | Home | LibXL version 3.6.0 »

Tip of Day: CURL with IMAP protocol

With CURL plugin functions you can use the IMAP protocol for downloading emails. The plugin connects to the imap server, performs a query and returns result, e.g. a list of email, the content of an email or something else. As you probably want to use SSL, please use "imaps://" as prefix. Our examples are normally without SSL.

So for querying folders, you can simply query URL:
URL = "imap://server/"

This gives you back a result like "." and "INBOX" or other folder names.

To query list of emails, you run a custom request to fetch flags for all emails like this:
Same URL with /INBOX to specify folder and you use OptionCustomRequest with "FETCH 1:* FLAGS".

Than to query a single email, you use no custom request, but you add to URL the postfix "/INBOX/;UID=1". 1 is here the index of the email you want to query.

Now if you need to delete email, change flags or create folders, you can check the IMAP specifications and pass commands using CustomRequest option.
For next plugin version, we'll have examples showing this.
20 07 14 - 12:29
one comment

Cool! Can’t wait to see this.
Beatrix Willius - 21 07 14 - 16:13

Remember personal info?

Emoticons / Textile

Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.