Happy New Year
[squirrelmail.git] / class / deliver / Deliver_SMTP.class.php
index f7365b07d42b970028553854a6a9c2882629b4cc..7016a58cbab8eabe928e0a2b97c6637a52989683 100644 (file)
@@ -5,7 +5,7 @@
  *
  * SMTP delivery backend for the Deliver class.
  *
- * @copyright 1999-2016 The SquirrelMail Project Team
+ * @copyright 1999-2022 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
@@ -57,7 +57,7 @@ class Deliver_SMTP extends Deliver {
 
     function preWriteToStream(&$s) {
         if ($s) {
-            if ($s{0} == '.')   $s = '.' . $s;
+            if ($s[0] == '.')   $s = '.' . $s;
             $s = str_replace("\n.","\n..",$s);
         }
     }
@@ -66,7 +66,7 @@ class Deliver_SMTP extends Deliver {
         global $use_smtp_tls,$smtp_auth_mech;
 
         if ($authpop) {
-            $this->authPop($pop_host, '', $user, $pass);
+            $this->authPop($user, $pass, $pop_host, '');
         }
 
         $rfc822_header = $message->rfc822_header;
@@ -163,7 +163,7 @@ class Deliver_SMTP extends Deliver {
         $tmp = $this->parse_ehlo_response($stream);
         if ($this->errorCheck($tmp,$stream)) {
             // fall back to HELO if EHLO is not supported (error 5xx)
-            if ($this->dlv_ret_nr{0} == '5') {
+            if ($this->dlv_ret_nr[0] == '5') {
                 fputs($stream, "HELO $helohost\r\n");
                 $tmp = fgets($stream,1024);
                 if ($this->errorCheck($tmp,$stream)) {
@@ -408,7 +408,7 @@ class Deliver_SMTP extends Deliver {
             $server_msg .= substr($line, 4);
         }
 
-        if ( ((int) $err_num{0}) < 4) {
+        if ( ((int) $err_num[0]) < 4) {
             return false;
         }
 
@@ -463,7 +463,7 @@ class Deliver_SMTP extends Deliver {
         return true;
     }
 
-    function authPop($pop_server='', $pop_port='', $user, $pass) {
+    function authPop($user, $pass, $pop_server='', $pop_port='') {
         if (!$pop_port) {
             $pop_port = 110;
         }