cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: testing for connectivity to the SMTP server using libcurl APIs

From: Chandran, Naveen <naveen.chandran_at_hp.com>
Date: Fri, 23 Nov 2012 14:26:59 +0000

Hi Steve,

>> However, on attempting the test code again with the
>> CURLOPT_CONNECT_ONLY option added, after the initial SMTP server
>> greeting, the code errors out as follows:

>You mentioned in your original post that you are using v7.23.1 and that is now a year old - Since then I have extended both the SMTP and POP3 protocols fixing numerous bugs along the way and as such I do this >myself for both protocols ;-)

Thanks. You are perfectly right. With the latest curl version available (v7.28.1), when I re-tested for the behavior, it works just as I had wanted it to.

>If you do have success, libcurl will:

>* Send the EHLO
>* Send the AUTH <mechanism>
>* Send the authentication details

>You can then re-use the connection to carry out additional performs, if you wish, such as sending an email ;-)
>When you come to cleanup libcurl it will disconnect gracefully by sending a QUIT command to the server.

The option CURLOPT_CONNECT_ONLY was what worked for me. Thanks again.

Regards,
Naveen

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-11-23