You've got a few syntax errors in that snippet:
PHP Code:
// missing single quote after "8bit"
// also, you're assigning instead of concatenating (so your $headers will contain *only* this last line)
$headers = "Content-Transfer-Encoding: 8bit . "\r\n";
PHP Code:
// should be:
$headers .= "Content-Transfer-Encoding: 8bit' . "\r\n";
Also, I would highly recommend considering
switching your encoding to UTF-8.
*****
I assume you mean the
email client, not browsers.
What I do is compose the email in plain text first, then, when necessary, add an HTML version )
markdown is a nice way to do this).
mail() is not a very good choice to send it, since it doesn't handle multipart messages conveniently. You might look at using
Pear's Mail class instead.
Keep in mind that email clients are generally "behind the times" when it comes to HTML support. Also, security settings and/or user preferences prohibit much of HTML - no scripts, usually no images, and a large subset of css won't work either. HTML emails are the one area where you still have to "design like 1999" - tables, inline styles, and so forth.
Bookmarks