cURL / Mailing Lists / curl-library / Single Mail

curl-library

SMTP: multi interface produce wrong error code for unknown recipient

From: Gokhan Sengun <gokhansengun_at_gmail.com>
Date: Mon, 21 May 2012 23:17:41 +0300

Hello Steve and folks,

I just noticed a small flaw in SMTP when it is used with multi interface.
If the recipient is unknown by the SMTP server, libcurl ends up with error
code CURLE_RECV_ERROR instead of a more meaningful one like
CURLE_LOGIN_DENIED (which is provided with easy interface currently). I am
not saying CURLE_LOGIN_DENIED is the best error here but it is the closest
to imply the error. I am doing my tests with the git master branch.

Can you see the problem at a glance? If not, I am going to dig this
tomorrow.

Test code (smtp-multi.c).
Test code's output (multi-out.txt)
Curl command line's output (easy-out.txt)

are all attached.

Thanks

-- 
it is twice as difficult to debug a program as to write it. Therefore, if
you put all of your creativity and effort into writing the program, you are
not smart enough to debug it.




-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2012-05-21