(Last Updated On: May 11, 2010)

[code lang=”php”]
$to = “[email protected]”;
$subject = “SUBJECT”;
$message = “MESSAGE“;
$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);

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.

Leave a Reply

Your email address will not be published.

%d bloggers like this: