From feb5a83984f25a2be48a71c0887fc741ab762738 Mon Sep 17 00:00:00 2001 From: cigamit Date: Mon, 21 Mar 2005 20:35:33 +0000 Subject: [PATCH] Fixed a few warning messages I ran into today when SMTP had died. We already output nice SMTP error messages, so no need to have the PHP code display its own errors. Also, the property dlv_server_msg was only being set in the errorCheck function, which was never ran if the socket connection failed, so we would get an undefined error. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9122 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- class/deliver/Deliver_SMTP.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/class/deliver/Deliver_SMTP.class.php b/class/deliver/Deliver_SMTP.class.php index 0017c3b5..1d989206 100644 --- a/class/deliver/Deliver_SMTP.class.php +++ b/class/deliver/Deliver_SMTP.class.php @@ -52,14 +52,15 @@ class Deliver_SMTP extends Deliver { } if (($use_smtp_tls == true) and (check_php_version(4,3)) and (extension_loaded('openssl'))) { - $stream = fsockopen('tls://' . $host, $port, $errorNumber, $errorString); + $stream = @fsockopen('tls://' . $host, $port, $errorNumber, $errorString); } else { - $stream = fsockopen($host, $port, $errorNumber, $errorString); + $stream = @fsockopen($host, $port, $errorNumber, $errorString); } if (!$stream) { $this->dlv_msg = $errorString; $this->dlv_ret_nr = $errorNumber; + $this->dlv_server_msg = ''; return(0); } $tmp = fgets($stream, 1024); -- 2.25.1