PHP Mail

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
quadoc
Forum Contributor
Posts: 137
Joined: Fri Jul 01, 2005 5:33 pm
Location: Atlanta, GA

PHP Mail

Post by quadoc »

Is there a way to use color text in mail body? For example, I like my $mailmessage to have red, blue and green color text. Please post some tips. Thanks...

mail($email, $subject, $mailmessage, $headers);
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

you could only color the text if you are sending in HTML format...
User avatar
quadoc
Forum Contributor
Posts: 137
Joined: Fri Jul 01, 2005 5:33 pm
Location: Atlanta, GA

Post by quadoc »

feyd, can you give me an example? Thanks...
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Set the content type of your email to html: text/html

The using HTML, you can change the color of the text to your liking.

There've been many posts about sending HTML email on the boards.. search around ;)
User avatar
dallasx
Forum Contributor
Posts: 106
Joined: Thu Oct 20, 2005 4:55 pm
Location: California

Speaking of PHP mail

Post by dallasx »

I run PHP on a Windows 2000 Server and PHP mail won't work for me
redmonkey
Forum Regular
Posts: 836
Joined: Thu Dec 18, 2003 3:58 pm

Post by redmonkey »

I've never had a problem in Windows although grnated I have not used 2K server (actually, I've never even heard of it).

May be a silly question, but have you defined your mailserver in php.ini?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: Speaking of PHP mail

Post by John Cartwright »

dallasx wrote:I run PHP on a Windows 2000 Server and PHP mail won't work for me
Please don't hijack threads, this belongs in your own thread
User avatar
dallasx
Forum Contributor
Posts: 106
Joined: Thu Oct 20, 2005 4:55 pm
Location: California

Re: Speaking of PHP mail

Post by dallasx »

Jcart wrote:
dallasx wrote:I run PHP on a Windows 2000 Server and PHP mail won't work for me
Please don't hijack threads, this belongs in your own thread
Sorry about that.
Post Reply