ID:               15841
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Open
 Bug Type:         *Mail Related
 Operating System: Linux
 PHP Version:      4.1.2
 New Comment:

The Right Thing(TM), then, is to determine which method (direct or SMTP
injection) is being done. If SMTP, use \r\n. If direct, determine what
the OS' line terminator is (\r\n for Windows, \n for Unix, \r for Mac
(?!)) and use that instead.


Previous Comments:
------------------------------------------------------------------------

[2002-03-04 05:36:24] [EMAIL PROTECTED]

on windows we *do* talk STMP ...

------------------------------------------------------------------------

[2002-03-03 16:27:44] [EMAIL PROTECTED]

This is causing mail generated by PHP to be BLOCKED as being
potentially a virus by some anti-virus SMTP servers.

The presence of "\r\n" in headers is typically a sign of a virus trying
to reach Outlook. Some antivirus products now totally block MIME mail
containing "\r\n".

This means all mail generated by PHP programs...

------------------------------------------------------------------------

[2002-03-02 20:05:00] [EMAIL PROTECTED]

Last November the mail documentation was changed from saying:
"Multiple extra headers are separated with a newline."
to:
"Multiple extra headers are separated with a carriage return and
newline. Note: You must use \r\n to seperate headers, although some
Unix mail transfer agents may work with just a single newline (\n)."

This change is inaccurate. Line breaks in headers should be the native
line endings for the system on which PHP is running.

The mail() function is not talking to an SMTP server, so RFC2822 does
not apply here. mail() is talking to a command line program on the
local system, and it is reasonable to expect that program to require
system-native line breaks.

Use of CRLF is known to break qmail systems where no conversion of line
breaks occurs on the input data. In this case using CRLF causes all but
the first extra header to appear in the message body (CRLF is
interpreted as two line breaks).

Possibly the best resolution to this problem would be for the mail()
function to convert any line breaks in arg 4 into the system's native
line breaks.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=15841&edit=1

Reply via email to