I am trying to send an html email. Mail is working properly but not going as html email and it is just displaying ".$message."
. The data is coming from the mysql database.
My script is as follows:
$to = $email;
$subject = $subject;
$message = "$message";
$htmlContent = '
<html>
<body>
".$message."
<br /><br />Regards<br /><b>TM</b>
</body>
</html>';
$headers = 'From: myemail@gmail.com' . "
";
$headers .= 'MIME-Version: 1.0' . "
";
$headers .= 'Content-type: text/html; charset=UTF-8' . "
";
if(mail($to, $subject, $htmlContent, $headers))
echo "Mail Sent";
else
echo "Problem sending email";