diff --git a/class.smtp.php b/class.smtp.php index 010a7aa6..9c4e34e6 100644 --- a/class.smtp.php +++ b/class.smtp.php @@ -989,7 +989,10 @@ class SMTP public function client_send($data) { $this->edebug("CLIENT -> SERVER: $data", self::DEBUG_CLIENT); - return fwrite($this->smtp_conn, $data); + set_error_handler(array($this, 'errorHandler')); + $result = fwrite($this->smtp_conn, $data); + restore_error_handler(); + return $result; } /**