I had some code which used to work fine, but just recently it has stopped working. Basically, it’s sending the e-mail as plain text, rather than as HTML formatted. The formatting used to work fine, but people started telling me it wasn’t rendering as HTML, and when I check by sending myself an email, it also is just text now. Can anyone tell me what’s going on? Is my code correct? Could it be something that my web host has changed?
[code=php]
$email = stripslashes($email);
$username = stripslashes($username);
$password = stripslashes($password);
$emailfrom = “[email protected]”;
$headers = “MIME-Version: 1.0rnContent-type: text/html; charset=iso-8859-1rnFrom:”.$emailfrom.”rn”;
$mailmessage = “<html>Thank you for registering.<br><a href=’http://www.mysite.net/validate.php?unid=”.$unid.”‘>Please click here to activate your account.</a></html>”;
$subject=”Your registration”;
mail($email, $subject, $mailmessage, $headers);
header(“Location: registered.php?returnurl=”.$returnurl);
I just can’t work out why it suddenly stopped working? If anyone can think of a reason, I would be grateful for the help. Thanks
Toby