1

I am composing html email.

I know from here:http://www.campaignmonitor.com/css/#css-com_1 that Outlook does not support background color but other clients does. I have nice green bg image and white text on it. But in outlook I see nothing - white text on white background with no background image.

Can I detect email client, and if it is Outlook, then change color style of my text from white to black, for example?

Things could be simplified, if I could render image with text and put image only, but I have to put links in text. Yes, I can use map/area, but this doesn't work on several important web email clients (freemail.ukr.net for me).

Anatoliy Gusarov
  • 797
  • 9
  • 22

2 Answers2

2

Yes you can target only Outlook using conditional CSS statements

But a better approach is to get it to actually work in Outlook. In html email it is best to declare your background color in a table like this:

<table bgcolor="#007700">...

Needs to be the 6-digit hex code for full client support.

For background images, check out emailbg.net for the only method where you can set a background image to a page element. (There is another non-VML way to do it that only works in the body tag)

Community
  • 1
  • 1
John
  • 11,985
  • 3
  • 45
  • 60
-1

Email client communications with the email-server does not work the same way as browser communication does. So this can't be done.

You're best bet would be to link to a webpage at the very top of the page. Something that says Can't View This Email? Click Here to view it in your browser.

rileychuggins
  • 79
  • 4
  • 12
  • Conditional rendering need have no knowledge of a "server". Outlook Express for instance identifies as IE, although it is now frozen at IE7. You can use conditional comments accordingly.... – mckenzm Dec 31 '16 at 06:58