Hi Dan, Thanks for your suggestion. I did try with the CURLOPT_NOBODY option set to 1. With that change however, I get the following error after the initial server greeting:
. . < 250-XUSR < 250 HELP > MAIL FROM:<[email protected]> < 250 < [email protected] >... Sender ok * response reading failed > QUIT * response reading failed * Closing connection #0 * Failure when receiving data from the peer curl_easy_perform() failed: Failure when receiving data from the peer Please let me know if there could be any other way I might be able to test for an SMTP server's connectivity. (kindly note: I would want to ascertain connectivity to the server without actually sending a mail, but would still want to present the authentication details) Thanks, Naveen -----Original Message----- From: curl-library [mailto:[email protected]] On Behalf Of Dan Fandrich Sent: Thursday, November 22, 2012 6:56 PM To: [email protected] Subject: Re: testing for connectivity to the SMTP server using libcurl APIs On Thu, Nov 22, 2012 at 11:52:39AM +0000, Chandran, Naveen wrote: >Please let me know if there is a way to test for proper SMTP server >connectivity using libcurl ‘without actually sending an email’. > >Although this could otherwise be done with a simple telnet EHLO (or >HELO), I would like to know if it can be accomplished using the libcurl API(s). I'm not sure if it's supported already, but it makes sense to me that the CURLOPT_NOBODY option could be usurped for this purpose. >>> Dan ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
