barryc Posted December 1, 2006 Share Posted December 1, 2006 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 009343Regards, Barry Quote Link to comment https://forums.phpfreaks.com/topic/29050-coloring-email-text/ Share on other sites More sharing options...
fert Posted December 1, 2006 Share Posted December 1, 2006 just use html Quote Link to comment https://forums.phpfreaks.com/topic/29050-coloring-email-text/#findComment-133100 Share on other sites More sharing options...
Fallen_angel Posted December 1, 2006 Share Posted December 1, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/29050-coloring-email-text/#findComment-133125 Share on other sites More sharing options...
barryc Posted December 1, 2006 Author Share Posted December 1, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/29050-coloring-email-text/#findComment-133134 Share on other sites More sharing options...
fert Posted December 1, 2006 Share Posted December 1, 2006 [code]mail("to","subject","<a href=\"http://www.mysite.com\">Mysite</a><p>I just wanted to tell you about my website</p>","MIME-Version: 1.0");[/code] Quote Link to comment https://forums.phpfreaks.com/topic/29050-coloring-email-text/#findComment-133149 Share on other sites More sharing options...
barryc Posted December 1, 2006 Author Share Posted December 1, 2006 Sorry, I must be really thick because ! cannot see the relevance in your submission regarding my original code snippet - I don't have any problem sending the email, the request was for help in coloring parts of the text........ Quote Link to comment https://forums.phpfreaks.com/topic/29050-coloring-email-text/#findComment-133166 Share on other sites More sharing options...
fert Posted December 1, 2006 Share Posted December 1, 2006 my code shows how to send an e-mail with html code that can be used to color the text Quote Link to comment https://forums.phpfreaks.com/topic/29050-coloring-email-text/#findComment-133177 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.