php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23205 Sending mail via SMTP-Auth fails
Submitted: 2003-04-14 11:07 UTC Modified: 2003-06-16 01:39 UTC
From: shabeker at siof dot cl Assigned: jon (profile)
Status: Closed Package: PEAR related
PHP Version: 4.3.0RC2 OS: Windows XP/2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: shabeker at siof dot cl
New email:
PHP Version: OS:

 

 [2003-04-14 11:07 UTC] shabeker at siof dot cl
I downloaded the latest pear package via cli\php -n -r "include 'http://go-pear.org';" but still got problems sending mail with SMTP authentification. With my Sniffer I get the following conversation between web server and mail server:

220 mymail.server.cl ESMTP Server (Microsoft Exchange Internet Mail Service 5.5.2656.59) ready
EHLO localhost
250-mymail.server.cl Hello [SEB]
250-XEXCH50
250-HELP
250-ETRN
250-DSN
250-SIZE 0
250-AUTH LOGIN
250 AUTH=LOGIN
AUTH LOGIN
334 **********
****************
334 ************
********
235 LOGIN authentication successful
EHLO localhost
503 Bad Sequence
HELO localhost
503 Bad Sequence

From what I understand of the SMTP protocol, after the 235 should come the MAIL FROM and RCPT TO, but not again an EHLO. PEAR doesn't output any error message related to that, only that:

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in C:\php\pear\Net\SMTP.php on line 697

But that seems to be another problem not related to my problem.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-14 13:43 UTC] shabeker at siof dot cl
Well, I digged a little into the topic and found out that there's another $this->_negotiate() after the successful authentication producing the second EHLO command. Regarding the SMTP.php code comment this is required by RFC-2554, but I don't see much sense in it and seems Microsoft doesn't either, so could there be a flag to suppress this second EHLO? I put it in a comment and all worked fine.

Searching in Google I found someone else with the same problem that did the same to solve it, on de.comp.lang.php in the thread "mail() mit Hamster?" from 2002-10-03.
 [2003-04-15 00:01 UTC] jon@php.net
I'm going to stand by RFC-2554 for the time being.  I'll consider adding a work-around for non-compliant SMTP servers.
 [2003-06-16 01:39 UTC] jon@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php

Fixed in Net_SMTP 1.2.3.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 17:01:29 2024 UTC