From: cigamit Date: Mon, 21 Mar 2005 20:35:33 +0000 (+0000) Subject: Fixed a few warning messages I ran into today when SMTP had died. We already output... X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=feb5a83984f25a2be48a71c0887fc741ab762738;hp=698de88b07d358896c04088b1eb44b0799d8baa7 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 --- 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);