Doc #63778 [Com]: RFC-2822 does NOT permit LF without CR

From: Date: Mon, 17 Dec 2012 20:27:18 +0000
Subject: Doc #63778 [Com]: RFC-2822 does NOT permit LF without CR
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9293@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63778&edit=1 ID: 63778 Comment by: mail+php at requinix dot net Reported by: Andy_Schmidt at HM-Software dot com Summary: RFC-2822 does NOT permit LF without CR Status: Open Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Actually no. What you're missing is that PHP itself does not send the email. It goes through sendmail (and whatever application that may be). MTAs will convert \n to \r\n but some do so regardless of the actual line ending used, so if you provide \r\n yourself then it may become \r\r\n. Using \n is best for compatibility. Previous Comments: ------------------------------------------------------------------------ [2012-12-15 15:09:26] Andy_Schmidt at HM-Software dot com Description: ------------ --- From manual page: http://www.php.net/function.mail#refsect1-function.mail-parameters --- Your manual incorrectly states for the "Message" parameter: "Each line should be separated with a LF (\n). Lines should not be larger than 70 characters." Refer to the governing Internet standard on SMTP emails: http://www.ietf.org/rfc/rfc2822.txt 2.1 "A line is a series of characters that is delimited with the two characters carriage-return and line-feed; that is, the carriage return (CR) character (ASCII value 13) followed immediately by the line feed (LF) character (ASCII value 10)." and it clarifies further: 2.3 "CR and LF MUST only occur together as CRLF; they MUST NOT appear independently in the body." Your manual should be updated to read: "Each line should be separated with a CRLF (\r\n). Lines should not be larger than 78 characters." ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63778&edit=1

« previous php.doc.bugs (#9293) next »