User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » php mail() function help Page [1]  
Novicane
All American
15413 Posts
user info
edit post

I have written a little submit form. I have it working and everything comes into the mailbox fine. I would like to bold some things inside of the mail.


Right now i have the following code:


$message = "
<h3>Street: </h3> . $streetaddress . "\n" .
<h3>City: </h3> . $city . "\n" .
";


when it comes into the mail box, nothing is changed and just shows the text like shown above.

any code that I need to add to make the email see the formatting? i've tried <Strong> and <B> as well.

4/17/2009 3:11:12 PM

BigMan157
no u
103352 Posts
user info
edit post

you need to set the content-type headers to "Content-type:text/html;charset=iso-8859-1"

[Edited on April 17, 2009 at 3:14 PM. Reason : or whatever charset you prefer ]

4/17/2009 3:14:27 PM

Novicane
All American
15413 Posts
user info
edit post

ah ok, thats it then.

was using this:


$headers .= "Content-type: text/plain; charset=iso-8859-1\n";


thanks.

4/17/2009 3:16:24 PM

BigMan157
no u
103352 Posts
user info
edit post

yeah, text/plain is just what it says, plain text

there's also ways to send both a text and an html version together, so that people with different mail reader presets have the version they prefer available to them formatted they way you'd like them to view it

if you want to go that route, look up multipart/alternative mail

[Edited on April 17, 2009 at 3:20 PM. Reason : multipart/alternative is also what you use if you want to send attachments]

4/17/2009 3:19:22 PM

DeltaBeta
All American
9417 Posts
user info
edit post

Bigman always beats me to it.

4/17/2009 3:50:11 PM

evan
All American
27701 Posts
user info
edit post

Bigman always beats me.

4/17/2009 5:06:12 PM

qntmfred
retired
40552 Posts
user info
edit post

Bigman always be me.

4/17/2009 5:09:48 PM

philihp
All American
8349 Posts
user info
edit post

Bigman always eats me.

4/17/2009 7:19:20 PM

BigMan157
no u
103352 Posts
user info
edit post

4/17/2009 8:45:12 PM

EuroTitToss
All American
4790 Posts
user info
edit post

4/18/2009 7:12:21 AM

 Message Boards » Tech Talk » php mail() function help Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.38 - our disclaimer.