Improved error display in sendmail()

SVN revision: 1614
This commit is contained in:
2006-01-18 11:28:13 +00:00
parent 9ef325e085
commit 1c5268c41c
+7 -1
View File
@@ -2101,6 +2101,9 @@ int sendmail(LOGBOOK * lbs, char *smtp_host, char *from, char *to, char *text, c
n = strbreak(to, list, 1024, ",");
for (i = 0; i < n; i++) {
if (list[i] == 0 || strchr(list[i], '@') == NULL)
continue;
snprintf(str, strsize - 1, "RCPT TO: <%s>\r\n", list[i]);
send(s, str, strlen(str), 0);
if (verbose)
@@ -18209,7 +18212,10 @@ int compose_email(LOGBOOK * lbs, char *mail_to, int message_id,
if (status < 0) {
sprintf(str, loc("Error sending Email via <i>\"%s\"</i>"), smtp_host);
strlcat(str, ": ", sizeof(str));
if (error[0]) {
strlcat(str, ": ", sizeof(str));
strlcat(str, error, sizeof(str));
}
url_encode(str, sizeof(str));
sprintf(mail_param, "?error=%s", str);
} else if (error[0]) {