curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Obtain Response String From a CURL Handle for SMTP Connections

From: RE lesgoe via curl-library <curl-library_at_cool.haxx.se>
Date: Fri, 4 Sep 2020 15:37:28 -0700

Hello,

I suggest a new CURLINFO value, CURLINFO_RESPONSE_STRING, that obtains a
full response string from a CURL handle for SMTP connections. Having the
string would be immensely helpful for SMTP connections because it would
help diagnose errors.

Currently, libcurl provides CURLINFO_RESPONSE_CODE, which may be sufficient
for HTTP and FTP connections, but is not adequate for SMTP connections.

For example, refer to Google's support page titled, "SMTP error reference" (
https://support.google.com/a/answer/3726730?hl=en), which lists 15 cases
where SMTP status code 550 describes different errors. Extending libcurl to
provide a mechanism to obtain SMTP enhanced status codes would still not be
enough. On the same webpage, you'll find that there are 8 cases that have a
status code 550 and enhanced status code 5.7.1.

Currently, the only way to obtain the full response string is by
enabling CURLOPT_VERBOSE and CURLOPT_DEBUGFUNCTION, which is overkill for
this situation.

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-09-05