garethhall Posted December 4, 2007 Share Posted December 4, 2007 Hi I have the following script and I know that it work, well it works on the local host setup. When I submit the from(html page) I receive an html email and that works fine. But when it is running on my webserver it doesnt send an html email I receive an email well like this Content-type: text/html; charset=iso-8859-1 From: Home Inspection Services Online Form < [email protected]> <strong>Name: </strong>Amber Wason <br><strong>Email Address: </strong><a href='mailto: [email protected]'>[email protected]</a> <br><strong>Message: </strong>test <br> Here is my script: if anyone can help that would be great <? $to = "[email protected]"; $subject = "Enquiry from website"; $message = "<strong>Name: </strong>$_POST[name]\n\n<br>"; $message .= "<strong>Email Address: </strong><a href='mailto:$_POST'>$_POST</a>\n\n<br>"; $message .= "<strong>Home Type: </strong>$_POST[homeType]\n\n<br>"; $message .= "<strong>Number of Levels: </strong>$_POST[levels]\n\n<br>"; $message .= "<strong>Number of Beds: </strong>$_POST[beds]\n\n<br>"; $message .= "<strong>Area in Auckland: </strong>$_POST[area]\n\n<br>"; $message .= "<strong>Message: </strong>$_POST[message]\n\n<br>"; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: Home Inspection Services Online Form<[email protected]>' . "\r\n"; mail($to, $subject ,$message, $headers); ?> Quote Link to comment https://forums.phpfreaks.com/topic/80065-html-email-not-working/ Share on other sites More sharing options...
PFMaBiSmAd Posted December 4, 2007 Share Posted December 4, 2007 Are you sending the email to the same TO: address in both cases and are you using the same email client program to read both the working html email and the one that does not work? The most likely guess for the case where it does not work is that the email client is setup for only plain text email. Quote Link to comment https://forums.phpfreaks.com/topic/80065-html-email-not-working/#findComment-405722 Share on other sites More sharing options...
garethhall Posted December 4, 2007 Author Share Posted December 4, 2007 No that is not the problem I am using the same mail cleint and address Quote Link to comment https://forums.phpfreaks.com/topic/80065-html-email-not-working/#findComment-405725 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.