cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Re: IMAP and POP3 with libcurl 7.30

From: Steve Holme <steve_holme_at_hotmail.com>
Date: Tue, 14 May 2013 21:10:09 +0100

Hi,

On Tue, 14 May 2013, 1xyzzyx1 wrote:

> thanks so far, but that was not quite a solution for me. Did
> anyone really test it? My evidence is quite good or not?

Firstly, please do not top post.

This is unfortunately a very quick reply as I don't have much time at the moment :( but I didn't want you to feel that you were being ignored here.

You will have noticed that the IMAP functionality whilst has been around for some time now only really became useful in curl / libcurl v7.30 and as such is very, very, very new - it really is in its infancy and may require more work to fully become usable. To a certain degree there were quite a number of issues (bugs and missing functionality) in both SMTP and POP3 as these two email protocols hadn't been used in anger until more recently.

As David has already mentioned the curl command line tool uses libcurl underneath so by virtue the code works - however the interface may not work how you expect and unfortunately I still haven't found the time to write my own IMAP module using libcurl yet :(

> Or what could have went wrong during compiling the lib? But
> the version output is also quite astonishing if it would not be
> the real 7.30 version.

Please note that CURLOPT_HEADER is not used by the email protocols and in order to control what the IMAP server gives you back in a FETCH request you need to specify what SECTION you want (such as HEADER, TEXT, etc...) in the URL. Please see the IMAP section of CURLOPT_URL in http://curl.haxx.se/libcurl/c/curl_easy_setopt.html for more details.

Also please note that the IMAP connection will be closed down when curl exits whereas you might be issuing several requests to libcurl in your own application - unless you specify several URL's to the curl CLI that may not be a fair comparison and whilst we have tried to test the new code with limited resources there may still be bugs that prevent another application behaving exactly the same as curl.

I would recommend reading the IMAP RFC (RFC-3501) and you might also like to take a look at some of the test cases (tests 800 to 809 in tests/data) to use as reference of what data can be returned from an IMAP server using curl and libcurl.

Please also bare in mind that whilst I know SMTP and POP3 inside and out I am still learning the IMAP protocol myself - which as you will have noticed is far more complex that POP3 so I am no expert at present :(

Sorry if this doesn't help too much but unfortunately the first few users of libcurl's IMAP interface are really going to be the guinea pigs so to speak, but please feel free to get involved / contribute / provide feedback / make suggestions / make improvements / provide bug fixes and maybe we can get libcurl's IMAP support to a level comparable with POP3 and SMTP ;-)

Kind Regards

Steve

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-05-14