From 7280a55d58df4cb11a0e8b7feb0b079d474622a6 Mon Sep 17 00:00:00 2001 From: lewa Date: Thu, 11 May 2017 02:27:15 +0300 Subject: [PATCH] low-level SMTP error handling from 6.0 branch (#1012) (#1041) --- class.smtp.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } /**