summaryrefslogtreecommitdiff
path: root/program/steps/mail/sendmail.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-07-06 09:13:10 +0000
committeralecpl <alec@alec.pl>2009-07-06 09:13:10 +0000
commit2818f8e9ed5e8853e33636ac8efe09e2a4161618 (patch)
tree1bd0c3a4534704922c5ad80647a4334c28cc2082 /program/steps/mail/sendmail.inc
parent2f2bb4020b5d3a79a65177d54fe1b5ade1efb69d (diff)
- Show SMTP errors in browser (#1485927)
Diffstat (limited to 'program/steps/mail/sendmail.inc')
-rw-r--r--program/steps/mail/sendmail.inc7
1 files changed, 5 insertions, 2 deletions
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index d550a422d..c5a2ea7c3 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -441,12 +441,15 @@ if (!$savedraft)
$OUTPUT->send('iframe');
}
- $sent = rcmail_deliver_message($MAIL_MIME, $from, $mailto);
+ $sent = rcmail_deliver_message($MAIL_MIME, $from, $mailto, $smtp_error);
// return to compose page if sending failed
if (!$sent)
{
- $OUTPUT->show_message("sendingfailed", 'error');
+ if ($smtp_error)
+ $OUTPUT->show_message($smtp_error['label'], 'error', $smtp_error['vars']);
+ else
+ $OUTPUT->show_message('sendingfailed', 'error');
$OUTPUT->send('iframe');
}