note 93980 deleted from function.mail by cmb
| From: | cmb@php.net | Date: | Fri, 19 Aug 2016 22:19:29 +0000 |
| Subject: | note 93980 deleted from function.mail by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-206333@lists.php.net to get a copy of this message | ||
Note Submitter: Maven1 at example dot com
----
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.