ID: 31167 Updated by: [EMAIL PROTECTED] Reported By: polone at townnews dot com -Status: Open +Status: Bogus Bug Type: Mail related Operating System: RedHat Linux 7.3 PHP Version: 4.3.10 New Comment:
Duplicate of #22962 -- caused more trouble than it was worth. Previous Comments: ------------------------------------------------------------------------ [2004-12-18 01:23:42] polone at townnews dot com Description: ------------ Please note, I have READ ticket #30226 - this person was right, but for the wrong reasons. The mail() function is not RFC822 compliant: BEGIN RFC822 SNIPPET >>> 3.2. HEADER FIELD DEFINITIONS These rules show a field meta-syntax, without regard for the particular type or internal syntax. Their purpose is to permit detection of fields; also, they present to higher-level parsers an image of each field as fitting on one line. field = field-name ":" [ field-body ] CRLF <<< END RFC822 SNIPPET All header fields inserted by PHP's mail() function are only separated with LF. Note that this causes issues with RFC822 compliant MTAs. The file where this is occuring is in ext/standard/mail.c, lines 228-233. As it turns out, probably anywhere you are doing LF you should be doing CRLF. References: RFC822 http://www.faqs.org/rfcs/rfc822.html Reproduce code: --------------- <?php mail("[EMAIL PROTECTED]", "RFC822 problems", "This message fails RFC822 compliance!"); ?> Expected result: ---------------- The generated mail message should be: To: [EMAIL PROTECTED] Subject: RFC822 problems\r\n \r\n This message fails RFC822 compliance!\r\n Actual result: -------------- To: [EMAIL PROTECTED] Subject: RFC822 problems\n \n This message fails RFC822 compliance!\n ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31167&edit=1