- Improve recovery when EHLO not supported on legacy SMTP servers
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 12 May 2006 14:39:55 +0000 (14:39 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 12 May 2006 14:39:55 +0000 (14:39 +0000)
  (#1031455).

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11125 7612ce4b-ef26-0410-bec9-ea0150e637f0

ChangeLog
class/deliver/Deliver_SMTP.class.php

index ef13c3d..933ecf7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -48,6 +48,8 @@ Version 1.5.2 - CVS
   - Added configtest hook in src/configtest.php.
   - Improved error handling for the help pages.
   - Fixed possibility to use single quote in provider name (#1475744).
+  - Improve recovery when EHLO not supported on legacy SMTP servers
+    (#1031455).
 
 Version 1.5.1 (branched on 2006-02-12)
 --------------------------------------
index e565ca8..3b94f1e 100644 (file)
@@ -140,8 +140,8 @@ class Deliver_SMTP extends Deliver {
         // Read ehlo response
         $tmp = $this->parse_ehlo_response($stream);
         if ($this->errorCheck($tmp,$stream)) {
-            // fall back to HELO if EHLO is not supported
-            if ($this->dlv_ret_nr == '500') {
+            // fall back to HELO if EHLO is not supported (error 5xx)
+            if ($this->dlv_ret_nr{0} == '5') {
                 fputs($stream, "HELO $helohost\r\n");
                 $tmp = fgets($stream,1024);
                 if ($this->errorCheck($tmp,$stream)) {