From 4e38bc70577f553a97a320bbd0a1d0c5dac70b6e Mon Sep 17 00:00:00 2001 From: kink Date: Fri, 12 May 2006 14:39:55 +0000 Subject: [PATCH] - Improve recovery when EHLO not supported on legacy SMTP servers (#1031455). git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11125 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- ChangeLog | 2 ++ class/deliver/Deliver_SMTP.class.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ef13c3dd..933ecf7e 100644 --- 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) -------------------------------------- diff --git a/class/deliver/Deliver_SMTP.class.php b/class/deliver/Deliver_SMTP.class.php index e565ca84..3b94f1e2 100644 --- a/class/deliver/Deliver_SMTP.class.php +++ b/class/deliver/Deliver_SMTP.class.php @@ -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)) { -- 2.25.1