Correct. I agree with you completely. However, the only hitch is that, libcurl (probably) doesn't allow us to customize the SMTP commands to be sent to the server through the SMTP specific curl options (and for good reasons). But on the other hand, I am unsure if you are suggesting that I use CURLOPT_TELNETOPTIONS to achieve this (I am yet to try that out though).
Thanks, Naveen -----Original Message----- From: curl-library [mailto:[email protected]] On Behalf Of SM Sent: Friday, November 23, 2012 12:06 AM To: libcurl development Subject: Re: testing for connectivity to the SMTP server using libcurl APIs At 03:52 22-11-2012, Chandran, Naveen wrote: >My presumption was that, after setting up the SMTP server URL (using >CURLOPT_URL), attempting just a 'FROM' alone (using >CURLOPT_MAIL_FROM) would suffice. >However, doing so sort of causes the code to get stalled (and then, >eventually time out), probably because the library is expecting the >'RCPT' and/or 'DATA' values too, in order to round up on the easy_perform. The "clean" way would be to: 1. send HELO 2. read 3. send FROM 4. read 5. send QUIT 6. read The session on the server side will be terminated (no timeout). Regards, -sm ------------------------------------------------------------------- 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
