Jump to content

Coloring email text


barryc

Recommended Posts

Hi,
Been struggling to sort this one out - hopefully not too trivial for the forum members!

code snippet:-

"This message was sent from:\n" .
"$http_referrer\n" .
"------------------------------------------------------------\n" .
"Name : $name\n" .
"Address: \n$home\n" .
"Phone Number : $phone\n" .

What I want to do is have the email arrive with the subject (not the variable) in color ..

ie desired output would be say 
[color=red]Name:[/color] Fred
[color=green]Phone Number:[/color] 0121 009343

Regards, Barry
Link to comment
https://forums.phpfreaks.com/topic/29050-coloring-email-text/
Share on other sites

Somethign else to be aware of is that you should hard code all of your colors and any formatting you want because if this is intended to go to people using things like gmail and hotmail you cant use css to style it as it will strip away any style tags before delivery  this also makes using divs a bit of a pain in the ass but meeh  not like they are gonna change it any time soon

Link to comment
https://forums.phpfreaks.com/topic/29050-coloring-email-text/#findComment-133125
Share on other sites

Maybe I am missing something here having tried virtually every variation of HTML code and quotation marks I can think of, but all result in either a parsing error, unexpected "<", unexpected ":" etc. 
How's about an example please - I really am not getting anywhere with this!  Regards, Barry
Link to comment
https://forums.phpfreaks.com/topic/29050-coloring-email-text/#findComment-133134
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.