From:             [EMAIL PROTECTED]
Operating system: Linux
PHP version:      4.1.2
PHP Bug Type:     *Mail Related
Bug description:  CRLF to separate mail headers is incorrect

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 bug report at http://bugs.php.net/?id=15841&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=15841&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=15841&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=15841&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=15841&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=15841&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=15841&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=15841&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=15841&r=submittedtwice

Reply via email to