Question

I guess this is a standards question and not a specific coding question.

I wanted to know if I needed to validate the HTML with something like W3C HTML Validation? If I send the DOCTYPE and META tags in the HTML email it doesn't render the HTML in the email properly but validates with W3C, but if I remove the DOCTYPE and META tags the HTML renders properly in the email client but now doesn't validate with W3C. Is this something that I should be concerned with or is this standard practice?

In PHP I'm doing Example #4 if you need to see how to send a HTML email in PHP

Was it helpful?

Solution

There is nothing standard in HTML e-mail at this time. While it is good to target towards valid HTML, you'll find there are lots of modifications you will need to make for your e-mail to work.

Target the client, not the specification, in this instance.

Perhaps some day valid HTML e-mail will be a reality, but it isn't for now.

OTHER TIPS

For HTML emails, currently it's best to use tables for any kind of layout you might want to do. Mailchimp has a few templates that can get you started for some basic email layouts.

MailChimp Email Templates

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top