phpDocumentor updates
[squirrelmail.git] / class / deliver / Deliver_SMTP.class.php
index 03aa6bc4fbaaa603dc7d71bb26d9eb198e329cf1..f9039e1e91a2d9a41eb6e7fec2e182ea9248807f 100644 (file)
@@ -1,23 +1,23 @@
 <?php
+
 /**
-* Deliver_SMTP.class.php
-*
-* Copyright (c) 1999-2004 The SquirrelMail Project Team
-* Licensed under the GNU GPL. For full terms see the file COPYING.
-*
-* Delivery backend for the Deliver class.
-*
-* @version $Id$
-* @package squirrelmail
-*/
+ * Deliver_SMTP.class.php
+ *
+ * Delivery backend for the Deliver class.
+ *
+ * @copyright &copy; 1999-2005 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package squirrelmail
+ */
 
 /** This of course depends upon Deliver */
 require_once(SM_PATH . 'class/deliver/Deliver.class.php');
 
 /**
-* Deliver messages using SMTP
-* @package squirrelmail
-*/
+ * Deliver messages using SMTP
+ * @package squirrelmail
+ */
 class Deliver_SMTP extends Deliver {
 
     function preWriteToStream(&$s) {
@@ -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);
@@ -68,9 +69,9 @@ class Deliver_SMTP extends Deliver {
         }
 
         /*
-        * If $_SERVER['HTTP_HOST'] is set, use that in our HELO to the SMTP
-        * server.  This should fix the DNS issues some people have had
-        */
+         * If $_SERVER['HTTP_HOST'] is set, use that in our HELO to the SMTP
+         * server.  This should fix the DNS issues some people have had
+         */
         if (sqgetGlobalVar('HTTP_HOST', $HTTP_HOST, SQ_SERVER)) { // HTTP_HOST is set
             // optionally trim off port number
             if($p = strrpos($HTTP_HOST, ':')) {