From 2818f8e9ed5e8853e33636ac8efe09e2a4161618 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Mon, 06 Jul 2009 05:13:10 -0400
Subject: [PATCH] - Show SMTP errors in browser (#1485927)

---
 program/steps/mail/func.inc |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index e7eb4b3..a942c1a 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -1302,7 +1302,7 @@
 /**
  * Send the given message compose object using the configured method
  */
-function rcmail_deliver_message(&$message, $from, $mailto)
+function rcmail_deliver_message(&$message, $from, $mailto, &$smtp_error)
 {
   global $CONFIG, $RCMAIL;
 
@@ -1327,7 +1327,7 @@
 
     // send message
     $smtp_response = array();
-    $sent = smtp_mail($from, $a_recipients, ($foo = $message->txtHeaders($send_headers, true)), $msg_body, $smtp_response);
+    $sent = smtp_mail($from, $a_recipients, ($foo = $message->txtHeaders($send_headers, true)), $msg_body, $smtp_response, $smtp_error);
 
     // log error
     if (!$sent)
@@ -1380,7 +1380,7 @@
 }
 
 
-function rcmail_send_mdn($uid)
+function rcmail_send_mdn($uid, &$smtp_error)
 {
   global $RCMAIL, $IMAP;
 
@@ -1438,7 +1438,7 @@
     $compose->setTXTBody(rc_wordwrap($body, 75, "\r\n"));
     $compose->addAttachment($report, 'message/disposition-notification', 'MDNPart2.txt', false, '7bit', 'inline');
 
-    $sent = rcmail_deliver_message($compose, $identity['email'], $mailto);
+    $sent = rcmail_deliver_message($compose, $identity['email'], $mailto, $smtp_error);
 
     if ($sent)
     {

--
Gitblit v1.9.1