Jump to content

mail()


common

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.