mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
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:
parent
9a7e85e0ff
commit
c9c2740c54
1 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue