Hello, just trying to put html in an email so it will read my href link. Its sending to the email but its showing all this as is instead of reading the html code. Anyone see whats wrong with this html email php? Thanks very much.
PHP Code:$validateemail = 'anemail@address.com ;
$from = 'noreplysupportaddress';
$subject = "Email validation" ;
$messageproper = "<html>
<head>
<title>HTML email</title>
</head>
<body>
<div><span style='font-family:arial,sans-serif;font-size:14px'>Testing text and html in an email.<a href='http:www.example.com/validate.php?username=$username
' target='blank'>Validate Your Email</a></span></div>
</body>
</html>";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$headers = "From: <$from>\r\n";
$headers .= "Reply-To: ".preg_replace('/[rn]+/', ' ', $from)."\r\n";
mail($validateemail, $subject, $messageproper, $headers);


Reply With Quote
Bookmarks