note 93980 added to function.mail
| From: | Maven1 at example dot com | Date: | Fri, 09 Oct 2009 20:28:37 +0000 |
| Subject: | note 93980 added to function.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-161604@lists.php.net to get a copy of this message | ||
I was having trouble with the newline and carriage return characters when using the mail function in
a custom script within Joomla since the stupid input validations kept stripping them (changed
"/r/n" to "rn").
To get around this, I used chr(13) and chr(10) to insert them.
<?php
$headers .= 'To: Mary <mary@example.com>, Kelly <kelly@example.com>' . chr(13)
. chr(10);
$headers .= 'From: Birthday Reminder <birthday@example.com>' . chr(13) . chr(10);
?>
Hope that helps someone.
----
Server IP: 192.41.40.227
Probable Submitter: 67.103.214.161
----
Manual Page -- http://www.php.net/manual/en/function.mail.php
Edit -- https://master.php.net/note/edit/93980
Del: integrated -- https://master.php.net/note/delete/93980/integrated
Del: useless -- https://master.php.net/note/delete/93980/useless
Del: bad code -- https://master.php.net/note/delete/93980/bad+code
Del: spam -- https://master.php.net/note/delete/93980/spam
Del: non-english -- https://master.php.net/note/delete/93980/non-english
Del: in docs -- https://master.php.net/note/delete/93980/in+docs
Del: other reasons-- https://master.php.net/note/delete/93980
Reject -- https://master.php.net/note/reject/93980
Search -- https://master.php.net/manage/user-notes.php