curl-library
Re: libcurl smtp error list?
Date: Fri, 29 Jun 2018 09:14:26 +0000
On 29 Jun 2018, at 05:14, Deven <topiwaladeven_at_gmail.com> wrote:
> I want to handle errors from curl_easy_perform() and provide a feedback to the users on what went wrong (SMTP server not correct, authentication failure, network not reachable, etc.).
> The errors mentioned in curl.h header are quite general (at least to me). Is there a list of protocol specific errors (in this case SMTP)?
I've only used them with HTTP so have no direct experience whether the latter in particular gives what you need for SMTP, but it seems like perhaps you are looking for CURLINFO_OS_ERRNO (for network not reachable etc) and CURLINFO_RESPONSE_CODE (for SMTP response codes)?
See https://curl.haxx.se/libcurl/c/CURLINFO_RESPONSE_CODE.html etc.
John
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-06-29