- Impact
- 25
Hi, I am trying to send an automated email from a registration form. How do I become capable to use HTML in my email? Here is what I have, please tell me what I am doing wrong!
it is sending the email fine, everything is fine, but the HTML is not being parsed. I would really appreciate any help!
PHP:
$subject="DONOTREPLY:Verification Email";
$text='Thank you for taking the time to register, you are almost ready to go. Just click the link below or paste it into your browser if it does not work. Thank you! <br><br><a href="http://www.thelinkhere" target="_blank">http://www.thelinkhere</a><br><br><br>If you did not register, just ignore this message. <br><br>Yours truly, <br><i>Dev Team</i>';
$body=addslashes(trim(htmlspecialchars($text)));
$to=$email;
$headers = 'MIME-Version: 1.0' . "\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\n";
$headers .= 'Reply-To: '.$to . "\r\n";
$headers .= 'From: Development Team' . "\n";
mail($to, $subject, $body, $headers);
it is sending the email fine, everything is fine, but the HTML is not being parsed. I would really appreciate any help!







