mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-12 19:33:03 +00:00
Improved error display in sendmail()
SVN revision: 1614
This commit is contained in:
parent
9ef325e085
commit
1c5268c41c
@ -2101,6 +2101,9 @@ int sendmail(LOGBOOK * lbs, char *smtp_host, char *from, char *to, char *text, c
|
|||||||
n = strbreak(to, list, 1024, ",");
|
n = strbreak(to, list, 1024, ",");
|
||||||
|
|
||||||
for (i = 0; i < n; i++) {
|
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]);
|
snprintf(str, strsize - 1, "RCPT TO: <%s>\r\n", list[i]);
|
||||||
send(s, str, strlen(str), 0);
|
send(s, str, strlen(str), 0);
|
||||||
if (verbose)
|
if (verbose)
|
||||||
@ -18209,7 +18212,10 @@ int compose_email(LOGBOOK * lbs, char *mail_to, int message_id,
|
|||||||
|
|
||||||
if (status < 0) {
|
if (status < 0) {
|
||||||
sprintf(str, loc("Error sending Email via <i>\"%s\"</i>"), smtp_host);
|
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));
|
url_encode(str, sizeof(str));
|
||||||
sprintf(mail_param, "?error=%s", str);
|
sprintf(mail_param, "?error=%s", str);
|
||||||
} else if (error[0]) {
|
} else if (error[0]) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user