Give more details when failing to send emails.
authorCarl Hetherington <cth@carlh.net>
Sun, 13 Oct 2024 19:15:58 +0000 (21:15 +0200)
committerCarl Hetherington <cth@carlh.net>
Sun, 13 Oct 2024 19:15:58 +0000 (21:15 +0200)
src/lib/email.cc

index 8557b40e0c808cf06f2e10b3e5d32bebd4dd0261..e2beb8f37dc0add5c6d6ad72310b1c6d7cfe0a82 100644 (file)
@@ -236,7 +236,7 @@ Email::send(string server, int port, EmailProtocol protocol, string user, string
 
        auto const r = curl_easy_perform (curl);
        if (r != CURLE_OK) {
-               throw NetworkError (_("Failed to send email"), string(curl_easy_strerror(r)));
+               throw NetworkError(_("Failed to send email"), String::compose("%1 sending to %2:%3", curl_easy_strerror(r), server, port));
        }
 
        curl_slist_free_all (recipients);