note 52856 added to function.mail
| From: | msheldon at desertraven dot com | Date: | Sun, 15 May 2005 07:09:53 +0000 |
| Subject: | note 52856 added to function.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-89443@lists.php.net to get a copy of this message | ||
Just a comment on some of the examples, and as a note for those who may be unaware. The SMTP RFC 822
is VERY explicit in stating that \r\n is the ONLY acceptable line break format in the headers,
though is a little vague about the message body. While many MTAs will deal with just \n, I've
run accross plenty of them that will exhibit "interesting" behaviours when this happens.
Those MTAs that are strict in compliance will definitely break when header lines are terminated with
only \n. They will also most likely break if the body of the message contains more than 1000
consecutive characters without a \r\n.*
Note that RFC 821 is a little more clear in defining:
"line
A a sequence of ASCII characters ending with a <CRLF>."
RFC 821 makes no distinction between header lines and message body lines, since both are actually
transmitted during the DATA phase.
Bottom line, best practice is to be sure to convert any bare \n characters in the message to \r\n.
* "The maximum total length of a text line including the <CRLF> is 1000 characters"
(RFC 821)
----
Manual Page -- http://www.php.net/manual/en/function.mail.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+52856
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+52856&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+52856&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+52856&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+52856&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+52856&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+52856&report=yes
Search -- http://master.php.net/manage/user-notes.php