Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

include css in html mail

Status
Not open for further replies.

XnosferatuX

Programmer
Aug 9, 2004
1
BE
Hi,

I have an access database in witch all my adresses are stored. With some vba-code I send everyone a mail. The body of the mail is stored in a separate file. This file containes all the code of a regular html-website with between the head-tags only:
Code:
<link rel=stylesheet href="location of online css-file" type="text/css">

So far so good, it sends out all the mail to everyone in the list, in html format. But when viewed with an online mail service (such as hotmail or yahoo) the style sheet seems to be vanished. If the mail is viewed with MS Outlook or Outlook Express the style is rendered just fine.

How can I take care of this problem.

TIA

Nosferatu
 
generally, I've found css is a bit of non-starter with html emails. If you find an answer, please share it with us all - there's a lot of people using HTML 3.2 for their emails, because it seems that's the only consistently supported standard.

<marc> i wonder what will happen if i press this...[ul][li]please tell us if our suggestion has helped[/li][li]need some help? faq581-3339[/li][/ul]
 
The CSS should work if you include the styles within the document itself rather than link to it.
Likewise, inline styles will work.
I do this myself for a newsletter I produce.

The problem is that not all mail clients will it and some will be ok with some styles and choke on others.

The best advice I can give is keep it simple, and make sure you use multipart messages that contain a text only version too.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top