cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Steve Holme <steve_holme_at_hotmail.com>
Date: Thu, 22 Nov 2012 19:54:46 +0000

Hi again,

> 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 ;-)

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.

Kind Regards

Steve

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