summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-12-03 11:40:59 +0000
committeralecpl <alec@alec.pl>2009-12-03 11:40:59 +0000
commit67a081753fefe38aeb8aeee1179312e0cd4185ee (patch)
treeca193c9a9aa6d7a6151a317cf3d6eb1640d75870
parent35b01b64f5cc9fe59d67f4f5abf01087d5221c13 (diff)
- Net_SMTP 1.3.4
-rw-r--r--program/lib/Net/SMTP.php7
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;