curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl smtp error list?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 29 Jun 2018 09:32:38 +0200 (CEST)

On Fri, 29 Jun 2018, Deven 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)?

No, there isn't. And I'm afraid it isn't likely to ever exist one either. And
it is actually a little done like this on purpose.

A lot of libcurl code is generic for all/many protocols and we have a generic
error code handling all over. It not only makes it very hard to figure out
exactly what error codes that can be returned for what protocols, it also
makes it a fairly "unstable" situation in the way that we may change internals
for the next release and then change the possible returns codes.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2018-06-29