views:

449

answers:

2

We have emails that can be branded in a varierty of different ways but still contain the same content. Therefore, I need to be able to send HTML emails that contain CSS styling but are still compatible with the majority of email clients. I've come across the following websites that detail the compatibility of email clients:

Most of the above clients don't seem support CSS styles specified in the element but they do support inline css. I wish to separate the branding of the emails into separate css files and then combine the styles inline at runtime. Is this possible? If not, are there any alternatives?

+1  A: 

What are you sending the email with? It should be possible with any programming language to combine your CSS files and write them into the email content when you are generating the email.

But it depends on what you are using to send the emails.

Nick Spacek
+1  A: 

We recently put together a templating system which might meet your need. Basically we created both HTML and Plain-Text versions of all emails which will be delivered. Inside each template we have tokens which are replaced at runtime with recipient-specific information. Our templates have tokens which represent names, urls, etc, but there's no reason why css references couldn't be replaced as well.

Another note, if you want your emails to be compatible with all email clients, you really need to send both plain-text along with HTML versions of the email. This is done using Alternative Views in .NET. You can read more about emailing, linked resources, alternative views and email exceptions here.

Ben Griswold