|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6537 mail() does not seem to handle SMTP multi-line responses
Submitted: 2000-09-04 16:19 UTC Modified: 2002-06-02 12:28 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: mlemos at acm dot org Assigned:
Status: Closed Package: Mail related
PHP Version: 4.0 Latest CVS (04/09/2000) OS: Windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: mlemos at acm dot org
New email:
PHP Version: OS:


 [2000-09-04 16:19 UTC] mlemos at acm dot org
There has been so many people complaining about not being able to
send messages with the mail() function on Windows that I decided to

Apparently, it seems that it is not handling SMTP multi-line responses.

Multi-line responses may be returned or not depending on the vendor of the SMTP
server.  The way it works is by returning a - character right after the
response code instead of a space. When this is returned, it means that this is
not the last response line.  So, the SMTP client has to fetch the next
response line until it finds the last one that has the same response code
followed by a space.

I don't use Windows, so I did not want to fix the problem because I would
not be able to try the fix. Anyway, it seems that all the fixing that is
needed lies within the Ack() function.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-10 01:26 UTC]
I have fixed this, and tested with manual input. Does anyone have a handy SMTP server that sends multi-line responses so I can test for real?
 [2002-06-02 12:28 UTC]
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at In case this was a documentation 
problem, the fix will show up soon at
In case this was a website problem, the change will show
up on the site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.

It's supposed to be fixed quite some time ago.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Sep 28 03:03:36 2021 UTC