开发者

HTML Email Validation?

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


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜