This is one of the strange problems i have faced in PHP.
When you try to send HTML mails using mail() function in PHP you get HTML code in the main instead of showing HTML Content.
It may happen because of some missing headers but it may happen because of some restrictions on mail server also.
So to cross check it you need to check following things first..
Check if you have provided proper headers and other things are proper or not.
Generally your code should be similar to this:
$headers = "From: [email protected]\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$to = "[email protected]ress.com";
$subject = "Any Subject";
// ok now send the mail
If still same and you find no errors then try to upload it on some test server and see whether itÃ¢â‚¬â„¢s working or not.
and still doesnÃ¢â‚¬â„¢t work then there could be problem with your web hostÃ¢â‚¬â„¢s mail server.
It doesnÃ¢â‚¬â„¢t happen with all the servers but few servers like 1and1 do not allow mails with Ã¢â‚¬Å“\nÃ¢â‚¬? in the end of each header.
So you just need to remove Ã¢â‚¬Å“\nÃ¢â‚¬? from the end of each header and keep only Ã¢â‚¬Å“\r”, it should slove your problem. 🙂
I hope this helps you.