I was wondering, is there a way of sending e-mails using php and make it send in HTML so the e-mail shows up in HTML. For example, when I use the mail function the only thing I can do with the message is seperate the lines with \n. I can't even bold or underline text (atleast I think I can't). I made a form using HTML and would like to send not only the information from the form but also something close to the format of the form to an e-mail. In other words, the e-mail would not show up only as a pile of information, but instead would show up as a filled out form.
Thanks for your help!
Jim
sending e-mails using php (more then just the mail function)
Moderator: General Moderators
-
Jimeee_1999
- Forum Newbie
- Posts: 4
- Joined: Tue May 28, 2002 8:33 am
- hob_goblin
- Forum Regular
- Posts: 978
- Joined: Sun Apr 28, 2002 9:53 pm
- Contact:
Try this
I think that this would help.
----------------------------------------------------------------------------
$headers .= "Content-Type: text/html; charset=iso-8859-1\n";
$headers .= "From: your_name<your_email>\n";
$mail = "<html><body>Enter your stuff here just like you would in a webpage, complete with all of the <b> tags,<br> tags and such</body></html>
$to = "some_email@someISP.com";
$subject = "Whatever";
//and then when you want to send mail just type in....
mail($to,$subject,$mail,$headers);
-----------------------------------------------------------------------------
There you go.... That should do it.....
----------------------------------------------------------------------------
$headers .= "Content-Type: text/html; charset=iso-8859-1\n";
$headers .= "From: your_name<your_email>\n";
$mail = "<html><body>Enter your stuff here just like you would in a webpage, complete with all of the <b> tags,<br> tags and such</body></html>
$to = "some_email@someISP.com";
$subject = "Whatever";
//and then when you want to send mail just type in....
mail($to,$subject,$mail,$headers);
-----------------------------------------------------------------------------
There you go.... That should do it.....