note 35658 deleted from ref.mail by didou
| From: | didou@php.net | Date: | Sun, 07 Dec 2003 02:32:21 +0000 |
| Subject: | note 35658 deleted from ref.mail by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-61528@lists.php.net to get a copy of this message | ||
Note Submitter: Brett
----
If one uses header info containing Content-type: text/html, then you may have issues with new lines.
If the user views in plain text, then <br> shows in the text.
If one relies on \r\n then it will not work because of the html content type.
Use a content type of text/plain instead.
$header = "Content-type: text/plain; charset=iso-8859-1\r \n";
So my header info looks like:
$headers = "MIME-Version: 1.0\r \n";
$headers .= "Content-type: text/plain; charset=iso-8859-1\r \n";
$headers .= "From: \"$myname\" <$myemail>\r \n";
$headers .= "Reply-To: \"$myname\" <$myemail>\r \n";
$headers .= "X-Priority: 3\r \n";
$headers .= "X-MSMail-Priority: High\r \n";
$headers .= "X-Mailer: Just My Server";
This gives good results from a linux server and email appears correctly in MS Outlook Express ans
hotmail(particularly fussy w/ headers).
Thus the $message newlines correctly too, instead of being run together if Content Type is text/html
$message = "Thank you for your enrolment.\r\n";
$message .= "Your member name is $member_name.\r\n";
Brett