Hacker News new | ask | show | jobs
by bellyfullofbac 1911 days ago
HTML in email is legacy hell. I wonder if someone wants to create a new MIME-type like text/html+css, and clients who want can implement it.

In theory you could have representations of the message like video/mpeg4 and text/plain, and depending on the client capabilities and configuration, the receiver could watch a video or read plain text. The information content of the 2 (or more) don't even have to be the same! Found this out when trying to parse text out of emails into a CRM system, another system sent information in the HTML part, but an empty plaintext part.

6 comments

It boggles my mind that Microsoft hasn't updated the Outlook desktop app to use the rendering engine from Edge rather than the 10+-year-old IE engine. That would resolve so many e-mail rendering issues. I imagine it must be due to security concerns.
Outlook comes with MS Office, so it's must render HTML with MS Word. Super logical ;)
I imagine it has less to do with security, and more with backward-incompatible changes.
Yea it’s bec you can send emails directly from word which I do all the time.
Emails are pretty simple once you realize you just have to stick to HTML <table>. Forget everything you know about the last 20 years of webdev improvements, like the ability to center something painlessly via flexbox, and you're good to go!
Who needs flexbox when you can simply use <center>!

/s

HTML in email is relatively uncomplicated once you understand the main limitations. The bigger challenge I find is setting the right expectation for what one can do in email, vs what certain stakeholders want to include in an email.
Outlook on Windows is such a pain in the ass. Who ever thought using Word to render HTML emails was a good idea should be pink bellied.
I guess that's sort of what AMP is.
I didn't even know that was a thing until the other day where I saw someone post on Twitter that they got an email that had basically a web storefront within the email. It was selling some product and it had a color selector and cart, the whole thing. I assume the checkout process would kick you to their actual website but it's still kinda crazy.
If they go that route I hope they explicitly ban non-inline content.

I’ve seen some hilarious plaintext content. One of the best was the raw template with the {{ customerName }} place holders.