diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-06-08 13:39:57 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-06-08 13:39:57 +0000 |
| commit | 0fb83bb56544362c616ffaa579973768f0d0bee1 (patch) | |
| tree | bbe1b32a12ecc593113c2cce9ebd549b09425cce /roundcubemail/program/include/rcube_smtp.php | |
| parent | d9daaac0849808d71f20faed21df4b51a3df0186 (diff) | |
- Add real SMTP error description to displayed error messages (#1485927)
git-svn-id: https://svn.roundcube.net/trunk@3727 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_smtp.php')
| -rw-r--r-- | roundcubemail/program/include/rcube_smtp.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/roundcubemail/program/include/rcube_smtp.php b/roundcubemail/program/include/rcube_smtp.php index 4525502db..3c54d479c 100644 --- a/roundcubemail/program/include/rcube_smtp.php +++ b/roundcubemail/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; |
