HTML mail() Sending as Plain Text

$to = "[email protected]"; $subject = "SUBJECT"; $message = "<b>MESSAGE</b>"; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: Mailer ' . "\r\n"; mail($to, $subject, $message, $headers);
Code language: PHP (php)

The above code does not always send emails in HTML as it should, it turns out there is a PHP Bug (http://bugs.php.net/15841) that comes into play with QMAIL and carriage returns.
If this is the case you should replace “\r\n” with a “\n” only.

Tags:
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments