Reputation: 8990
$to = "$email";
$subject = "Thank You";
$message = "<p>Thanks for applying</p>";
$from = "[email protected]";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
when i send this email to myself, i still see the html tags, why is this thanks!!
Upvotes: 1
Views: 266
Reputation: 81384
You need to send the Content-type
header as text/html
.
For example, change the $headers
line to
$headers = "From: $from";
$headers .= "\nContent-type: text/html";
Upvotes: 4
Reputation: 18798
You need to set your headers content type. Like:
$headers.= 'Content-type: text/html; charset=UTF-8' . "\r\n";
Upvotes: 1