diff options
author | alecpl <alec@alec.pl> | 2010-06-08 13:39:57 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2010-06-08 13:39:57 +0000 |
commit | 349a8e36e581694cb200e4f3097d7af8c8628662 (patch) | |
tree | 8af291a4d50a99e8fab2da120ac051e7b28a1644 /program/include/rcube_smtp.php | |
parent | 64e3e80743415e5fb121eb5c66416593c38ef288 (diff) |
- Add real SMTP error description to displayed error messages (#1485927)
Diffstat (limited to 'program/include/rcube_smtp.php')
-rw-r--r-- | program/include/rcube_smtp.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/program/include/rcube_smtp.php b/program/include/rcube_smtp.php index 4525502db..3c54d479c 100644 --- a/program/include/rcube_smtp.php +++ b/program/include/rcube_smtp.php @@ -196,7 +196,9 @@ class rcube_smtp // set From: address if (PEAR::isError($this->conn->mailFrom($from))) { - $this->error = array('label' => 'smtpfromerror', 'vars' => array('from' => $from, 'code' => $this->conn->_code)); + $err = $this->conn->getResponse(); + $this->error = array('label' => 'smtpfromerror', 'vars' => array( + 'from' => $from, 'code' => $this->conn->_code, 'msg' => $err[1])); $this->response[] .= "Failed to set sender '$from'"; $this->reset(); return false; @@ -215,7 +217,9 @@ class rcube_smtp foreach ($recipients as $recipient) { if (PEAR::isError($this->conn->rcptTo($recipient))) { - $this->error = array('label' => 'smtptoerror', 'vars' => array('to' => $recipient, 'code' => $this->conn->_code)); + $err = $this->conn->getResponse(); + $this->error = array('label' => 'smtptoerror', 'vars' => array( + 'to' => $recipient, 'code' => $this->conn->_code, 'msg' => $err[1])); $this->response[] .= "Failed to add recipient '$recipient'"; $this->reset(); return false; |