Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the latest on HTML Email best practice?

I've been asked to build something that will generate HTML Emails.

The last time I created one of these was about three years ago, and so I was wondering if the warnings about using tables, nested tables, having to use inline stylesheets etc. still had to be heeded, or whether (hopefully) email clients had caught up a bit with browsers, and would allow use of external stylesheets, divs and so forth.

I did have a good Google for info, but most articles I found were a few years old, and so was wondering what the current state of play was.

Can anyone update me on the latest best practice?

Many thanks!

like image 340
dogsolitude_uk Avatar asked Aug 02 '11 10:08

dogsolitude_uk


2 Answers

We recently put together an HTML email. We learn't the following:

  • There is HUGE disparity in HTML and CSS support in modern and older clients alike. And mostly that support is pretty terrible.
  • Do not use external or header CSS. Inline EVERYTHING.
  • Use tables for layout. Nested tables I think are ok, we didn't see any problems with this.
  • Use a service like Email-on-Acid to check how your mail renders in different clients.
  • Making something that looks nice and polished across the major clients is a gigantic pain and will take you 5 times longer than you imagine.
  • In short, nothing's changed in the last 3 years.

Good luck!

like image 196
Richard H Avatar answered Oct 14 '22 21:10

Richard H


Don't use HTML email.

...if you have the choice. However, seeing as you've been asked to use HTML email, here are a few things I can think of. Mail clients like Thunderbird have improved their HTML support a lot lately, but it's still unreliable, especially given the not-so-modern clients floating around.

  • keep your email content as simple as possible
  • make sure that it looks alright without images; most email clients disable image rendering until told to do otherwise for each message
like image 31
Delan Azabani Avatar answered Oct 14 '22 19:10

Delan Azabani