From ca90a9c174b815facf76295488567f281716179f Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Tue, 07 Jul 2009 13:29:45 -0400
Subject: [PATCH] - handle smtp errors in show action (when mdn is send)

---
 program/steps/mail/show.inc |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc
index 39d2e1a..2395ac6 100644
--- a/program/steps/mail/show.inc
+++ b/program/steps/mail/show.inc
@@ -84,9 +84,11 @@
   {
     if (intval($CONFIG['mdn_requests']) === 1)
     {
-      if (rcmail_send_mdn($MESSAGE->uid))
+      if (rcmail_send_mdn($MESSAGE->uid, $smtp_error))
         $OUTPUT->show_message('receiptsent', 'confirmation');
-      else
+      else if ($smtp_error)
+        $OUTPUT->show_message($smtp_error['label'], 'error', $smtp_error['vars']);
+      else	
         $OUTPUT->show_message('errorsendingreceipt', 'error');
     }
     else if (empty($CONFIG['mdn_requests']))

--
Gitblit v1.9.1