4 ms·
I had to develop some email templates a while back for the first time and was almost shocked that they still use the "tables method" for layouts. Overall I'd sa
by _fat_santa 3y ago
I had to develop some email templates a while back for the first time and was almost shocked that they still use the "tables method" for layouts. Overall I'd say developing email templates now is much like developing websites in the early 2000's, email clients have such a wider range of CSS support that there are hacks all around. We now have frameworks like MJML and Foundation that do their best to abstract all that stuff away through components but take a look under the hood at the rendered HTML and it's a very scary and nostalgic place.
- dylan604 3y agoBut if you wrote an email template app based on tables, why would you change it if it's not broken? Why would you go through the hassle and expense of redeveloping your app just to not use tables? No sane person looks at the HTML of an email. Only poor souls that get a request on how to send email spam in-house might ever consider it, or just the perversely curious. Either way, nobody cares what it looks like under the hood as long as it looks good when viewed in the client.
- epiccoleman 3y agoI JUST had this same issue. Even worse, the Sendgrid "sample renderer" supports flex, but Gmail doesn't, so I didn't notice there was a problem until I started sending myself test emails, and then had to rewrite the whole template with tables. Madness!
- zlg_codes 3y agoE-mail was never meant to support HTML, though, and it's a major vector for attacks. I wish more servers would disallow or strip HTML from their incoming messages. Generally speaking, if I see an HTML e-mail I know the other end cares NOTHING about security or efficiency, and is actively trying to snoop on me with analytics. Not surprising you had to fall back to very old HTML to hit a common featureset.
- chrisfinazzo 3y agoAs I’ve been converting from .docx to HTML, I was pleasantly surprised to find that using flexbox to lay out three elements in a single row is perfectly fine and - bonus points- the CSS doesn’t make want to gouge my eyes out. To your point that HTML can be a security risk, I remember interviewing at The College Board in mid 2011 and finding out that they still sent critical information - think testing admission tickets - with a MIME type of text/plain. If you need to guarantee delivery and readability, no matter where people are getting the message, I don’t see how you can do it any other way.