php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1622 solution of mail() function problem
Submitted: 1999-06-29 04:50 UTC Modified: 1999-06-29 14:59 UTC
From: sagawa at sohgoh dot net Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.11 OS: Win32
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sagawa at sohgoh dot net
New email:
PHP Version: OS:

 

 [1999-06-29 04:50 UTC] sagawa at sohgoh dot net
(I'm Japanese not English Speaker, so there is
many incorrect. I'm sorry. ;-( )

Hello,
Here is "solution of mail() funtion problem".

--1--
In sendmail.c, there is "\n" instead of "\r\n".

Quote from RFC #821.
There are
MAIL <SP> FROM:<reverse-path> <CRLF>
RCPT <SP> TO:<forward-path> <CRLF>
HELO <SP> <domain> <CRLF>
QUIT <CRLF>
and so on...

For exsample,
====================================================
Line 164:
	Post("QUIT\n"); --> Post ("QUIT\r\n");
Line 224:
	sprintf(GLOBAL(Buffer), "HELO %s\n", ...
                     v
	sprintf(GLOBAL(Buffer), "HELO %s\r\n", ...
etc...
====================================================

This is cause of these Win32 mail() function bug,I think.

--2--
Only ".\r\n" line in body, It works DATA ends,and ...
It should write two dotts,shouldn't it?

Thank you. I'm looking foward fixed version.

--------------------
Akihiro SAGAWA
sagawa@sohgoh.net

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-06-29 14:59 UTC] jim at cvs dot php dot net
Thanks for the tip. Fixed in CVS.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 10:01:33 2025 UTC