note 106157 added to function.mail
| From: | http://www dot saganwebdesign dot com at osu1 dot php dot net | Date: | Fri, 14 Oct 2011 14:01:34 +0000 |
| Subject: | note 106157 added to function.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-183880@lists.php.net to get a copy of this message | ||
If you are getting frustrated that your email is being sent as plain text instead of HTML, typically
one of your headers showing up in the email (even if other scripts on the same server seem to work
fine!!!) then structure your headers like this:
$headers = 'From: You <you@mail.com>' . "\n";
$headers .= 'MIME-Version: 1.0' . "\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
Notice that the From is before the MIME and Content and only Content ends with "\r\n", the
other are just "\n"
Not sure how it is possible for other scripts on the same server, same domain to work fine as shown
in the very top instructions, and others need this crap... I spent a very frustrating couple hours
figuring this out, hope you can avoid doing the same.
----
Server IP: 69.147.83.197
Probable Submitter: 67.60.197.213
----
Manual Page -- http://www.php.net/manual/en/function.mail.php
Edit -- https://master.php.net/note/edit/106157
Del: integrated -- https://master.php.net/note/delete/106157/integrated
Del: useless -- https://master.php.net/note/delete/106157/useless
Del: bad code -- https://master.php.net/note/delete/106157/bad+code
Del: spam -- https://master.php.net/note/delete/106157/spam
Del: non-english -- https://master.php.net/note/delete/106157/non-english
Del: in docs -- https://master.php.net/note/delete/106157/in+docs
Del: other reasons-- https://master.php.net/note/delete/106157
Reject -- https://master.php.net/note/reject/106157
Search -- https://master.php.net/manage/user-notes.php