Make the line endings recommended in mail() consistent in all the parameters.

Fixes doc bug #63778 (RFC-2822 does NOT permit LF without CR).


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@328840 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Adam Harvey 2012-12-19 01:27:48 +00:00
parent 9a7e85e0ff
commit c9c2740c54

View file

@ -63,8 +63,8 @@
Message to be sent.
</para>
<para>
Each line should be separated with a LF (\n). Lines should not be larger
than 70 characters.
Each line should be separated with a CRLF (\r\n). Lines should not be
larger than 70 characters.
</para>
<caution>
<para>
@ -208,10 +208,10 @@ $text = str_replace("\n.", "\n..", $text);
<![CDATA[
<?php
// The message
$message = "Line 1\nLine 2\nLine 3";
$message = "Line 1\r\nLine 2\r\nLine 3";
// In case any of our lines are larger than 70 characters, we should use wordwrap()
$message = wordwrap($message, 70);
$message = wordwrap($message, 70, "\r\n");
// Send
mail('caffeinated@example.com', 'My Subject', $message);