diff options
author | alecpl <alec@alec.pl> | 2009-12-03 11:40:59 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2009-12-03 11:40:59 +0000 |
commit | 67a081753fefe38aeb8aeee1179312e0cd4185ee (patch) | |
tree | ca193c9a9aa6d7a6151a317cf3d6eb1640d75870 | |
parent | 35b01b64f5cc9fe59d67f4f5abf01087d5221c13 (diff) |
- Net_SMTP 1.3.4
-rw-r--r-- | program/lib/Net/SMTP.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/program/lib/Net/SMTP.php b/program/lib/Net/SMTP.php index 9b835d723..6df13a029 100644 --- a/program/lib/Net/SMTP.php +++ b/program/lib/Net/SMTP.php @@ -226,9 +226,10 @@ class Net_SMTP { $this->_debug("Send: $data"); - if (PEAR::isError($error = $this->_socket->write($data))) { - return PEAR::raiseError('Failed to write to socket: ' . - $error->getMessage()); + $error = $this->_socket->write($data); + if ($error === false || PEAR::isError($error)) { + $msg = ($error) ? $error->getMessage() : "unknown error"; + return PEAR::raiseError("Failed to write to socket: $msg"); } return true; |