Below is how to send HTML emails from PHP.
<?php
$to = 'email_address‘;
$subject = ‘subject‘;
$random_hash = md5(date(’r', time()));
$headers = “From: email_address\r\nReply-To: email_address“;
$headers .= “\r\nContent-Type: multipart/alternative; boundary=\”PHP-alt-”.$random_hash.”\”";
ob_start();
?>
–PHP-alt-<?php echo $random_hash; ?>
Content-Type: text/html; charset=”iso-8859-1″
Content-Transfer-Encoding: 7bit
<h2>Hello Blue World!</h2>
<p>This is something with <b>HTML</b> formatting.</p>
–PHP-alt-<?php echo $random_hash; ?>–
<?
$message = ob_get_clean();
$mail_sent = @mail( $to, $subject, $message, $headers );
echo $mail_sent ? “Mail sent” : “Mail failed”;
?>
