Fixed a few warning messages I ran into today when SMTP had died. We already output...
authorcigamit <cigamit@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 21 Mar 2005 20:35:33 +0000 (20:35 +0000)
committercigamit <cigamit@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 21 Mar 2005 20:35:33 +0000 (20:35 +0000)
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

index 0017c3b5c2b38bf8835d334eea6339d6d10eab80..1d989206dcbc61c420c87c3c0078021741e730c6 100644 (file)
@@ -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);