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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Jun 13 08:01:30 2024 UTC