summaryrefslogtreecommitdiff
path: root/program/steps/mail/sendmail.inc
diff options
context:
space:
mode:
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');
}