common Posted January 28, 2010 Share Posted January 28, 2010 HI all! I am writing a script for email and i am using the mail() function. It works perfectly and sends the email. But now i want to change the appearance, say using html to put the email message in a table with a header, 2columns and a footer! I am not sure how to do this! Can anyone help please attached is my script (the first page is only to make the form bit more userfriendly) [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/190087-mail/ Share on other sites More sharing options...
Yucky Posted January 28, 2010 Share Posted January 28, 2010 You'll need to set the headers so the content is treated as HTML. Example: $headers = "Content-Type: text/html; charset=iso-8859-1"; mail($_POST['to'],$_POST['subject'],$_POST['message'],$_POST['form'],$headers); Just incase you're intending to put the script in a public place on your site, becareful with allowing anybody to use your server to send mail. Link to comment https://forums.phpfreaks.com/topic/190087-mail/#findComment-1002935 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.