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