ktpsns 5 years ago

It would be really nice to have a small and simple markup language, say some markdown standard, to be the layouting language for E-Mails. No (external) images, just links, lists, headings, basic formatting.

HTML E-Mails are a security nightmare, even if "only" CSS is "allowed" and JS/iframes/external images are not loaded.

  • jcranmer 5 years ago

    You're basically advocating for text/richtext (aka text/enriched), which was originally proposed explicitly as a replacement for HTML in email. It failed essentially because everyone who didn't want HTML wanted only plain text, and everyone who wanted something like HTML was happy to just use HTML.

    Factoid of the day: Netscape added support for a <blink> tag to text/enriched bodies, and that support remains in every client that's still using Netscape's MIME code. The comment above this code just says: "Of course, both text/richtext and text/enriched must be enhanced somehow... Or else what would people think."

    • chrismorgan 5 years ago

      From RFC 1896:

      > There are other text formatting standards which meet some of these criteria. In particular, HTML and SGML have come into widespread use on the Internet. However, there are two important reasons that this document further promotes the use of text/enriched in Internet mail over other such standards:

      > 1. Most MIME-aware Internet mail applications are already able to either properly format text/enriched mail or, at the very least, are able to strip out the formatting commands and display the readable text. The same is not true for HTML or SGML.

      > 2. The current RFC on HTML [RFC-1866] and Internet Drafts on SGML have many features which are not necessary for Internet mail, and are missing a few capabilities that text/enriched already has.

      > For these reasons, this document is promoting the use of text/enriched until other Internet standards come into more widespread use. For those who will want to use HTML, Appendix B of this document contains a very simple C program that converts text/enriched to HTML 2.0 described in [RFC-1866].

      It sounds to me like text/enriched was being proposed not so much as a replacement for HTML, but because HTML and related technologies were not yet mature enough. This wording expressly frames text/enriched as a stop-gap measure.

  • cygned 5 years ago

    No markdown, but we had success with this one: https://mjml.io/

    Try out the online examples.

    • adamredwoods 5 years ago

      We use https://foundation.zurb.com/emails.html It is essentially rows and columns, but the support has been great across Outlook and gmail, as well as mobile support.

      • justinator 5 years ago

        The only problem I guess is that the last release was over three years ago, and some bugs are starting to show (saying nothing of any added features). The pace of the npm environment is moving so fast, that it's sometimes hard to even get a project up and running.

        Things feel a little stale.

        For example (from this week of my adventures with Foundation for Emails) Google Fonts almost sort of work for email, but there's just no real easy way to tell this framework to use them, or call any web font.

    • gitgud 5 years ago

      Wow, that's pretty cool, what's the consistency across different clients like?

      Having email rendered consistently across many email clients was the main reason we stayed with Mail Chimp for so long...

      • erichurkman 5 years ago

        It's pretty good. A few clients are still PITA (looking at you, Outlook 2007 and Yahoo mail. You still have to do jump through hoops for accurate background images, or fancy things with borders.

        The actual markup MJML generates is terrifying, and can be very large payloads. A simple hero graphic, some styled body text, a few buttons, and a footer was around 60KB/message. It got gnarly for us as our MTA had a max-payload size per API 'send' call (Mandrill) so our max send rates were partially constrained by MJML's fat markup.

        But totally worth it to not spend _as_ much time satisfying the mail clients of the world.

        • marpstar 5 years ago

          I agree with all of this. When you really start to dig in to cross-client compatibility (and you observe what MJML does to provide it) you start to get a sense that NOT using a tool like MJML is a hopeless path.

    • pintxo 5 years ago

      Thanks, looks like a great solution.

  • gpvos 5 years ago
    • Moru 5 years ago

      Email is so fun, every time someone comes with a new idea, someone pulls out an RFC detailing it. Dated 20+ years back.

    • ktpsns 5 years ago

      Thanks for the RFC link. Yes, basically.

      I mean, different mime versions of the same content are a possibility to do this transition: Send both plaintext, HTML and markdown, and the receiver could choose to display markdown if he otherwise would display plain text.

      To be honest, this won't come. Google is pushing AMP into mails, that's exactly the opposite direction.

      • sjwright 5 years ago

        It’s so stupid. If AMP emai ever became a thing, every single non google email client would just fetch and store the contents of the AMP page the moment an AMP email arrives. So what was the point of it?

        • rypskar 5 years ago

          Not so sure about that, not downloading anything extra and only showing what is embedded in the email is one of the good things with using an email client. Using AMP email is back to thinking tracking pixels works in emails

          • jlokier 5 years ago

            If the content isn't inline, perhaps it's better to have the mail server fetch it when the email is received, so that the sender can't track whether you are reading it.

            This has been discussed before with regard to external links to images. I think that always made sense, but it makes even more sense to do this when the core content is external. Then fetching it would be just another part of the SMTP/HTTP transaction sequence to deliver a mail.

            • sjwright 5 years ago

              Exactly. If most mail clients downloaded it automatically upon receipt instead of on view then the tracking benefits get diluted to the point of uselessness.

              (Actually, thinking further it would have to be done server side to avoid leaking your personal IP. For a webmail provider that’s obviously straightforward, while IMAP servers could be extended to automatically replace AMP email directives with a static HTML attachment.)

              • jcranmer 5 years ago

                So you want RFC 2017 basically?

                • sjwright 5 years ago

                  No, I want AMP email to never happen. Failing that, I want the email server to un-AMP-ify incoming emails for me.

            • rypskar 5 years ago

              Should it do that for all emails sent to the domain, or only for valid addresses? If they only fetch for addresses in use this will open up for an easy way for spammers to verify if an address is in use or not

              • jlokier 5 years ago

                Spammers can already verify if an address is _accepted_ because their message will be rejected with an error code at SMTP transmission time if it isn't.

                The first stage of spam filtering, and greylisting, also reject at SMTP transmission time.

                I'd do the HTTP fetch when SMTP is about to accept the message, making the HTTP round trip just another part of the transaction.

                Since spam filtering is likely to look at the HTTP response, you might want to reject the SMTP transaction after seeing the HTTP response, rather than accept the SMTP transaction based on address alone.

      • yuft 5 years ago

        Isn't markdown just turned into html?

    • bscphil 5 years ago

      Markdown strikes me as a much improved version of exactly this, with the advantage that you don't have to have a supporting client to read the email, since it's simply plain text.

      I want to see email clients start to support Markdown, so I can just send it to everyone.

      • captn3m0 5 years ago

        Not just email, I’d like to see browsers support Markdown natively. You can style your content. All media sites can be 100% markdown without any JS.

  • matharmin 5 years ago

    Markdown is nice for composing, but not as a standard to be supported by many clients. CommonMark is an improvement, but there is way to many ambiguities and differences in supported features over different markdown parsers for it to be feasibly used as a standard.

    Markdown is also not any better than HTML in terms of security - most markdown parsers allow passing through arbitrary HTML, and then depend on sanitizing the HTML for security.

    What you are asking for is effectively a smaller subset of HTML to be used for for email (which is kind of how it started...)

    • jandrese 5 years ago

      This is a bigger issue than most people care to admit. I post stuff to a number of different sites that support "Markdown" and not a single one agrees on even something a simple as how to format a hyperlink. I end up having to hit the help page on every site to remember which syntax they use, if they even support the feature at all. HTML might be "ugly", but at least it is consistent.

      • tzs 5 years ago

        I wish there was a browser extension to handle that. It would provide an editing area that would allow you to edit using the same markup on different sites, and when you are done would translate to whatever markup format that site uses and fill in the site's edit area with that.

        • jandrese 5 years ago

          There are some bits of typical markdown syntax that I really don't like. Like pasting code requires you to add 4 spaces to the start of every line and an extra linefeed between each line. That's a lot of work and every time I do it I say "How is this better than <pre></pre>?"

          I've yet to see what I'd really like: preformatted text being surrounded by markers that make it easy to paste in, like so:

              Some regular text
          
              vvvvv
          
              Preformatted text
          
              ^^^^^
          
          It would be cool if the extension could do that and then do all of that obnoxious formatting for me. Or heck, it could be a full up WYSIWYG editor.
    • greghendershott 5 years ago

      Not sure why you're being down-voted. (As usual here, only clicking a down-vote button contributes little value.)

      - You are correct that implementing markdown consistently is hard because there is no real spec. CommonMark is a spec, which helps, but a heroically thorough spec, so it's still not exactly trivial to implement.

      - You are correct that markdown can escape to HTML. Indeed certain marketing email "features" probably would do this?

      If I am missing something maybe someone could make an actual contribution to the discussion and explain.

      In any case I think by far the most important point was made elsewhere: Google AMP is awful for the web and for email, both.

      p.s. edit: Actually, I think the even more important point is that anything except plain text email is awful. :) So there, sure, use markdown or org-mode formatting conventions. Humans are pretty good at handling messy human protocols.

    • m463 5 years ago

      Why is markdown so popular? It seems so braindead.

      • holy_city 5 years ago

        # why is markdown so popular? ## (my opinion)

        Markdown is fast to type for the majority of use cases since you have:

        - bullet points

        - headings

        - __bold__

        - __italic__

        - `inline code`

        - etc

        ```

        fn you_even(_have: &str) -> &str { "nifty little code blocks without needing to indent" }

        ```

        And more importantly, markdown syntax preserves the structure of the document without harming legibility, unlike say latex or HTML. That limits it, since the syntax is small, but also reduces friction in learning/writing markdown.

        Also, Reddit + GitHub.

        • m463 5 years ago

          Sorry, poor choice of words.

          I thought hacker news used markdown, but I guess has its own thing.

          I can see the severely constrained formatting options of hacker news has both positive and negative consequences.

  • aloisdg 5 years ago

    Beside, I am using Markdown in all my email thanks to https://markdown-here.com/ and Thunderbird

    • zczc 5 years ago

      The idea behind Markdown Here is good, but it has some issues like keeping a copy of the markup text base-encoded in some html attribute which can be lead to unintentionally leaking full text while forwarding part of the message.

  • neop1x 5 years ago

    The idea of markdown is great because it it essentially a text. Even if the client would not support it, humans would be able to read it just fine. Much better and more secure than rich HTML. For example my email client won't display images by default and I am happy with that. Rich HTML should be on the web only IMO!

  • t0astbread 5 years ago

    This + multipart/alternative email and maybe something like uMatrix or similar firewall mechanisms in mail clients

  • hawski 5 years ago

    But isn't Markdown a sugar on top of HTML? When something does not fit Markdown one is supposed to write inline HTML.

ht_th 5 years ago

It might be interesting to include "pine" and "mutt" as well, as a baseline of mail clients that do not support HTML out of the box. (At least with mutt you can set it up to automatically render HTML emails via "w3m")

More importantly, though, I convinced all mail clients I use to just show plain text when viewing and writing my emails. Often there are HTML emails in which I do not see all the content, or content at all. For me this is nice because most HTML emails I get are spam, marketing related, or organizational nonsense.

  • inops 5 years ago

    I use Gnus in Emacs as my email client. I've got it set up to render plain text if available, but if the mail is only HTML, it will fallback to use Emacs' shr (Simple HTML Render) library. It's basic support, but works well enough most of the time to make the mail readable. Worse comes to the worse, I just open the HTML in a web browser. If I get to that stage, it's almost always spam or something else not worth reading.

  • e12e 5 years ago

    Doesn't (al)pine support html part out of the box (not sure, been a while since I used pine). I'd imagine support for more mime types that eg Gmail via:

    http://alpine.x10host.com/alpine/alpine-info/misc/mime.html

    But I might be wrong. I thought both pine and mutt would handle html through w3m or something?

  • fanf2 5 years ago

    Pine (or rather Alpine) does have HTML support built in and enabled by default.

  • rinze 5 years ago

    Same for me. I have a 'newsletters' folder which is the only one for which mutt will try to show me the HTML part first. Otherwise, it's plain text.

shrumm 5 years ago

I'm surprised to find no mention of MJML on this thread - it's more of a developer tool than a user facing one. You get to design your emails using a simplified markup language that resembles HTML, and it converts it into minified HTML that works pretty well on most email clients. Kudos to the guys behind it!

  • gotts 5 years ago

    MJML is great.

    I think that https://www.caniemail.com in many cases would be a timewaster. Because you spend your time exploring each individual CSS/HTML feature availability and later on realizing something can not be done in fully crossbrowser/cross-email-client way. Instead you could just accept the limitation of MJML and start coding the final version right away.

  • emilsedgh 5 years ago

    This is the correct response and really needs to be upvoted for everyone to see.

LeonM 5 years ago

CSS in email clients is a mess. Like IE6 on steroids.

I switched to a Windows on my work laptop about 6 months ago, and the native Win 10 email client is probably the worst offender out there. Even the popular mailing lists (like IH, PH, etc) are completely broken to the point of unreadable in Windows 10 Mail.

Mailchimp has a pretty good guides on how to create cross-compatible layouts:

https://templates.mailchimp.com

  • canofbars 5 years ago

    From what I remember outlook uses the word rendering engine. Writing any kind of layout that works on all email clients is absolute hell. For most complex layouts it seems most companies just send it as an image with the text being the only other element

    • ameen 5 years ago

      As someone who builds email regularly for Outlook - table based layouts work best, if you want to be fancy one could do some fancy VML stuff.

  • dehrmann 5 years ago

    Looks like they at least followed the IE pattern of having conditional comments. Embedding IE CSS hacks in one place (and possibly degrading the site) made working with IE almost tolerable.

gondo 5 years ago

I've used this guide to navigate email styling nightmare: https://www.campaignmonitor.com/css/

And this tool to test emails before sending: https://litmus.com/

  • ukyrgf 5 years ago

    Campaign Monitor's documentation has been the go-to solution for years. But I'm sure everybody working with email HTML already knows about it.

segfaultbuserr 5 years ago

> Can I email plaintext?

> No results found. Why not suggest this feature to be added?

It's worth sending a pull-request.

  • jolmg 5 years ago

    I wonder what content-types email clients support besides HTML and plaintext. Would any support mp3, mp4, markdown, org or odt?

    EDIT: Hmmm found this[1], and this[2]. They talk about using TROFF, TEX, Postscript, voice data, etc. I wonder if something like that ended up implemented somewhere.

    EDIT 2: I opened an issue[3].

    [1] https://tools.ietf.org/html/rfc1049

    [2] https://tools.ietf.org/html/rfc767

    [3] https://github.com/hteumeuleu/caniemail/issues/23

    • ainar-g 5 years ago

      E-Mails typeset in TeX sounds amazing! Right now you'd have to compile your TeX code to PDF/PS/DjVu and send that, which is far from perfect.

      • segfaultbuserr 5 years ago

        And imagine opening an E-mail that contains a PhD paper requires 15 minutes of compilation...

  • ainar-g 5 years ago

    Plaintext? Is that a new CSS framework? /jk

    Very few enterprises these days provide a “Text only, please” option in their E-Mail subscription options. Jira is, by all means, terrible software, but at least they do have this feature. I guess it's one of those situations where few people understand what it is and why you would want that. And even less people who care.

grenoire 5 years ago

Christ on a bike, the state of Outlook on Windows is absolutely miserable. I knew it by experience when I started preparing HTML signatures for our company, but seeing the list makes me even sadder about the absolute state of incompetency caused by legacy systems in Microsoft. For those uninformed, Outlook on Windows effectively works on a terrible (and terribly old) implementation of HTML that was initially developed for Word from 2001 (or older, can't remember exactly).

The Outlook ecosystem has to die.

  • ndidi 5 years ago

    Everything that discourages designers from doing fancy things is good in my book.

    • enraged_camel 5 years ago

      You don't get it. Stuff like this does not discourage designers. It is what gets them jobs and keeps them employed. I've worked with marketing departments where it was a designer's primary job to make things look good on email campaigns.

      • other_herbert 5 years ago

        I had a recent request from a product owner to style the subject line... I said we can't do that and that I don't want to live in a world where senders can change the font or size of the subject in an email.... Can you imagine the crap we would have from spam in that case?!

        • buildzr 5 years ago

          You can always pack it with emojis and unicode characters... that's what all the spammers seem to do at least.

        • pbhjpbhj 5 years ago

          Y̗̳̬͍̘͚o͘u͏ ͏̬̟̩h̦̕a̰̖͍̟v̧̯̜͉͙̖͖͉e҉̳̲̙͚̗̬ ̤͚͉̀w̢̫͎̮̼͇o̷̮̙̩n̪͙͎̠͔ ̻̮a̛̭ ̡̪̤̻ͅp̵̭͇r̩͉į̬̺̭̯͍͙z̯͈͟e!͖̖͈̯

          ie don't any mua let you use UTF8?

          𝔻𝕠𝕖𝕤 𝕥𝕙𝕚𝕤 𝕨𝕠𝕣𝕜?

          • jraph 5 years ago

            The first one does not work great in a terminal. The words are readable but I don't get the full experience. The second one, pretty good.

            • thirdfail 5 years ago

              Seems like your terminal doesn't support the last line. I will repeat all three lines in tunarly fashion.

              Line 1:

              " You have wøn a prize! "

              Unincluded line; my sister got bitten by a prize once. Or a terminal. Onto line twø: two:

              Line two: (2:)

              " ie don't any mua let you use UTF8? "

              And three:

              " Does this work? "

              All the lines for all the good people. The " signs " are a delimiter for each line. They're, or should be pretty verbatim, minus the unrenderability.

              Have fun.

              • jraph 5 years ago

                Ah, I referred to the third line, "𝔻𝕠𝕖𝕤 𝕥𝕙𝕚𝕤 𝕨𝕠𝕣𝕜? ", as the "second one" in my message, without mention for line 2, which renders correctly, fortunately. But thanks for the heads up.

          • e12e 5 years ago

            Firefox on mobile mangle that pretty bad on - at least the vertical space :/

            • jraph 5 years ago

              Firefox Mobile renders it well for me, are you sure that the comment is not rendered as it should be (with garbage from line 1 overflowing over line 2)?

              • e12e 5 years ago

                I thought the owerflow should be "well behaved" (in terms of correct layout/vertical space)?

                Is it correct to have "overhang" into the line below? Isn't it a case of incorrect layout?

      • leppr 5 years ago

        Indeed, if it's possible, marketing is going to ask for it. And unless you have dedicated developers who specialize in email campaigns, ready to brave the nightmare that is fighting against email client formatting, the only sane and cost-effective solution to implement any kind of layout in an email is simply stacking inline images with text included.

    • grenoire 5 years ago

      Microsoft's history has shown time after time that both internal conflict and external enterprise clients' requests lead to random developers adding bits and pieces of non-standard features. This applies not only to Outlook but their other products (incl. Windows). It is goddam' Wild West out there and they clearly give no crap about how the standards outside of their universe evolve.

      Sorry Microsoft, but the PC world is not Windows-only anymore.

    • usaphp 5 years ago

      By the same logic you could say that internet explorer was doing good things

      • thomasahle 5 years ago

        No, the logic is: I want styled content on the Web and plain text in my emails.

        • amiraliakbari 5 years ago

          It's not a new problem and MIME was intended to give people the choice. Not everyone likes plain text emails or terminal email clients. The solution may be forcing email senders to include text/plain as well as text/html.

        • usaphp 5 years ago

          For that very reason you have MIME type setting

  • jasonjayr 5 years ago

    Fix: Send WINMAIL.DAT attachments with fully formatted RTF/DOC files. Ta-da!

    • Geezus42 5 years ago

      Fix: breaks encryption add-ons

  • alberth 5 years ago

    I believe Outlook still uses the Microsoft Frontpage html engine.

    For those who don’t know, it’s was Microsoft WYSIWYG website builder that looked similar to Word, from 20 years ago.

    https://en.m.wikipedia.org/wiki/Microsoft_FrontPage

    • smacktoward 5 years ago

      Nope, believe it or not, ever since Outlook 2007 it uses the HTML rendering engine from Word itself. Seriously! Someone at Microsoft looked at Outlook and said "this needs to have the same rendering capabilities as noted Web browser Microsoft Word." Sheesh.

      • unilynx 5 years ago

        I think they thought ‘lets just use Word to compose replies, but to prevent the email from getting corrupted once the user hits reply, we’ll already mangle it on the way in so the sender gets the blame’

  • ecf 5 years ago

    Office for Windows still uses Internet Explorer as the renderer for addins built with OfficeJS, unless you're on Windows 1903 and using an insider version of Office.

    I had depressed thoughts when I discovered I would be having to debug Internet Explorer in 2019.

  • duxup 5 years ago

    I'd love to hear from some insiders how all these non standard outputs get decided inside MS. I can imagine a lot of scenarios based on experience and just thinking it out but I'd love to hear the real story.

  • jrochkind1 5 years ago

    The samsung email client manages to support flexbox, along with pretty much every other client but AOL... and Outlook Windows.

sitkack 5 years ago

Nooooo! More plain text and less html. If we need to, lets define a strict subset, lets call it html5-lite and it will only have a handful of tags and two css modes that are not user definable.

svat 5 years ago

I'm just now trying to send some mathematics in an email (where most recipients will be reading it in Gmail), so I'm having to figure out what subset of HTML and CSS Gmail supports. (Found this reference for CSS: https://developers.google.com/gmail/design/reference/support...) It turns out that simply using MathJax or KaTeX and pasting the resulting web page into an email doesn't work: Gmail doesn't support SVG images (security concerns?), so one needs to convert images to PNG, but then converting every $n$ or $x$ into a separate image feels like overkill (the email would become huge and slow to load), so it would be nice to only convert expressions that “really” need it. It seems Pandoc by default has a mode where it converts only “simple” expressions and throws a warning on math that cannot be converted to simple HTML (using "em" and "sup" tags and a Unicode alphabet for things like ∑), so we can use this as a trick to identify which math expressions need conversion to images. Then if any of these images occurs inline, we need to figure out the baseline problem.

And so on... Funny how trying to do the slightest thing with technology (send some mathematics over email) immediately turns into a research project.

  • ktpsns 5 years ago

    That's why most folks I know either write a short latex file (and append pdf+tex) or write pseudo code or full latex code because... The recipient understands latex.

    But honestly, this is way more portable then mathjax or MathML or whatever. Consider using a latex enabled chat when it really differs.

    • svat 5 years ago

      Yes, those were two other options I considered. Ultimately both require higher effort from the reader (view the PDF, or mentally parse LaTeX syntax or have something special installed that does so), neither of which is conducive to quick skimming etc. Just optimizing for reader convenience. :-)

  • orf 5 years ago

    Have you done any benchmarking on the sizes of the images? I cannot imagine a JPEG math expression, cached by google, is going to take an age to load when viewed in Gmail and not be that large.

    • svat 5 years ago

      That's a good question. The actual size of the images is not large: the problem is that I can visually see the email take a while to load properly, even for an email containing just two PNG images that are 2941 bytes and 6333 bytes respectively. If nearly every sentence were to be interrupted a few times with such delayed-loading images, the reading experience would be rather poor.

      (This was with the images self-contained in the email, which seems to be implemented under the hood by having them be attachments and referring to them in the body, so the loading happens out of order... I haven't tried with the images being loaded as external images, but that has its own problems such as Gmail probably not loading them by default, or having to ensure the images will be available over the internet for as long as anyone might want to read the email which if you're sending it to a mailing list is ideally forever, etc.)

      • claar 5 years ago

        Try embedding Base64 images in the email instead:

          <img src="data:image/png;base64,iVBORw0K...=">
        • londons_explore 5 years ago

          Inline base64 shouldn't have any head of line blocking or slow rendering issues, unlike embedded images-as-mime-attachments, which will normally result in one HTTP request to gmails servers per image, and without QUIC you'll get head of line blocking and limited/no HTTP pipelining making that very slow.

          Inline base64 should perform fine for small images up to ~10k images I'd guess on most hardware.

          If your email contains more than 10k math equations, perhaps email isn't the right tool...

marban 5 years ago

Anyone wanna chime in on conversion rates when it comes to styled vs. plain text? I always hear that the latter converts better, i.e. "Make it look like as if it was sent by a friend" and obviously it's a business related matter but I wonder why plain isn't used more often when visuals/emotion aren't the #1 selling points.

  • mrweasel 5 years ago

    Thinking in terms of "conversion rates" feels to me like the reason why we're in this mess. Email to me isn't about conversion and advertising newsletters. It's about written information, so there's no reason to even support HTML, in most cases.

    Arguably there's situation where an image will help in conveying information, or where a table will make information more readable. There's no situation where CSS is required.

    • tatersolid 5 years ago

      Written information clearly benefits from bold, italics, ordered and unordered lists, section headers, etc. Normal people don’t really understand text surrounded by underscores or asterisks (I never receive messages with those constructs from non-technical people).

      Formatting lists or indented quotes (also common in “normal” email usage) using white spaces and other semi-arbitrary characters is tedious and brittle.

      The “rich text” features of HTML email definitely improve readability and understanding when used with restraint.

      • Fice 5 years ago

        It is useful to have a way to represent structural and semantic information in email text (paragraphs, headings, quotes etc.), but not custom layouts and styling — that should remain under full control of the reader.

    • inclurl 5 years ago

      Include an URL to any external content. All URLs are plaintext, ideally.

      My 3845743985793847948 gigabyte Linux ISO. Is here, in email-contextual plain text: http:/linux.iso/3845743985793847948/gib

      My xes tapes? All stored at this address http://xes.sepat/all

      What's the problem. Email works. Without formatting.

  • dansman805 5 years ago

    I think images are used for marketing emails because spam filters are worse at detecting them.

greyhair 5 years ago

You send me anything other than plain text in an email, and I don't already have a source filter for your address, it gets sent to a folder that I might look at if I have the time some day.

  • pembrook 5 years ago

    So you don't buy things online or travel or do your taxes digitally?

    99% of important transactional email I get is HTML. Kind of nice to have your boarding passes and two-factor authentication emails easily visible.

    • slrz 5 years ago

      Most such mail tends to be not just HTML but rather multipart/alternative with an HTML but also a text/plain part.

      Luckily, HTML only (or its bastard cousin: including a text/plain part that is horribly broken or just says "please enable HTML viewing") isn't seen that often around here.

    • michaelmrose 5 years ago

      Normally one does business on the website and then what one gets in their mail isn't an interactive utility running in their mail client but rather either some record of the transaction you will rarely need or a link to complete some activity on their actual website.

      Click this link to reset your password or some such.

  • andrei_says_ 5 years ago

    How do you filter for plain text (look)? Given that most clients will send html version along with the plain text?

tiborsaas 5 years ago

I'm all over for using cutting edge CSS solutions but when it comes to HTML email, I'm just:

    <h1>Hello</h1>
    <p>...</p>
    <p>...</p>
    <em>Thanks!</em>
and it's done :)
  • jorangreef 5 years ago

    How about this?

      Hello
      ...
      ...
      Thanks!
    • LaGrange 5 years ago

      I want to have embedded links, tables and images (but only ones that are attachments), which plaintext isn't sufficient for. On the other hand, I want _only_ that, and notably they all provide a nice and obvious client-side failover for TTY software without requiring attaching a 2nd copy of the text.

    • tiborsaas 5 years ago

      HTML in email helps readability, titles, lists, tables does help the recipient.

      • DocTomoe 5 years ago

        Nothing that cannot more elegantly be solved by using MarkDown ...

        ... or common sense.

        • jraph 5 years ago

          I don't want to parse Markdown when I read emails.

          (and I don't have common sense either)

        • lolknuth 5 years ago

          Or you could say at a plaintext email first paragraph: You have to use your own fun/gun for this, and just type in plain text.

          • DocTomoe 5 years ago

            ... which is perfectly ok, because MarkDown nicely degrades to plain text.

        • KingMachiavelli 5 years ago

          As long as the varient of Markdown supports tables, vanilla markdown is laking in that area.

    • collinmanderson 5 years ago

      I take the hybrid approach:

          <b>Hello</b><br>
          ...<br>
          ...<br>
          <em>Thanks!</em>
  • lolknuth 5 years ago

    Let's fix your comment:

    % I'm all over for using cutting edge CSS solutions but when it comes to HTML email, I'm just:

    % <h1>Hello</h1> % <p>...</p> % <p>...</p> % <em>Thanks!</em>

    Let's make two billion dollars great again. Unpolitically.

    % and it's done :)

    Die poor.

  • anon777778 5 years ago

    So now imagine that you would like to add <button>.

    Well... Good luck with shady VML tricks!

    https://buttons.cm/

    • tiborsaas 5 years ago

      Buttons in emails sound fishy :) I would just use an inline styled anchor.

6d6b73 5 years ago

Why using plain text is better:

- readable under any mail client and any text editor

- smaller size files

- safer

- better accessibility and compatibility with screen readers

  • jraph 5 years ago

    I don't get why plain text would be more accessible than a well-formed HTML email. A screen reader could say "this is a title", "this is a list item".

    In plain text, what do you get? "dash bla bla"? Though I hope screen reader are more intelligent than that, but it seems like a more complex problem than just using information given by a well-formed HTML text.

    • megous 5 years ago

      Give people HTML and most e-mails will be a complete undecipherable garbage on the markup level.

      Basically almost everyone puts anything there so that they get some visually pleasing result, the markup semantics be damned.

      One would think that lack of features of various mail clients would lead to using the lowest common denominator of some basic tags like b, i, a, hr, and maybe img.

      Not so in reality.

      One bank I've seen e-mails from even abuses invalid parsing of HTML comments, to produce whatever insane result someone somewhere dreamed up, like this:

        <!--><div style="some:crap"><!-->...
      
      Which is straight up invalid HTML, that sanitizing parsers like caja will reject. I had a fun of telling a client, that I will not purposefully break parsing algorithm of a HTML sanitizing parser just so that their customers can read mails from their bank.

      (Experiences from writing a web mail client to be used in a real world.)

    • 6d6b73 5 years ago

      Well, plain text doesn't require smart or sophisticated screen readers. Anything that can read text will work, that's why plain text emails are more accessible. Not every person that needs screen reader can afford some top of the line device.

    • scbrg 5 years ago

      A "well-formed HTML email" is about as common as a "functioning Communist state". I'm sure they're both great, and I'll let you know when I see one.

akuji1993 5 years ago

Just saw Rémi Parmentiers talk at SmashingConf 2019, worth a watch, it's not online yet though, so you guys might have to wait a day or two. He's the guy behind this project and probably one of the most knowledgable persons about everything email.

skissane 5 years ago

> This page ranks email clients based on their support among the 58 HTML and CSS features listed on Can I email.

> (Because every test is done manually, some features might not have been tested on every email client.)

I wonder, could they not create a single test email exercising all 58 features? Then one would just have to open the test email in a given client and compare it to a reference rendering. (Kind of like the Acid1/2/3 tests of yore.)

  • grenoire 5 years ago

    I would guess that there are certain unforeseen interactions between failed implementations, maybe certain ones prevent emails from being rendered etc. I suppose those could be documented as well, but would take a lot of extra effort to figure out the combinations.

  • tln 5 years ago

    I'm guessing the feature list has grown over time. Each time more features are added, 58 clients need to be checked.

Existenceblinks 5 years ago

My goodness, this HTML in email things could cost you a job. I was burnout once by making 30 emails with variable layout work across popular email clients and screen sizes. Can I Email is definitely needed. But I will never do these fancy marketing emails ever again. Use plain text to communicate for your whatever incoming campaigns. Or if we really want HTML just use it without stylesheet, just plain tags.

awestroke 5 years ago

I just use premailer[1] to automatically convert the email html I write to outlook compatible html 0.1 gibberish

[1]: https://github.com/peterbe/premailer

  • jrochkind1 5 years ago

    I don't think premailer provides any solution for figuring out what CSS works with outlook or altering CSS to work with outlook? It mostly just, as it says, "Turns CSS blocks into style attributes". That is a different problem/issue than OP is about.

  • collinmanderson 5 years ago

    I'm starting to run into the emails themselves just being too darn large (over 1mb). There's no gzip with email.

Lxr 5 years ago

Why use HTML in emails though?

  • omnimus 5 years ago

    Because mere humans like to have images, colors and text formating in emails.

  • yyyk 5 years ago

    Because nothing else has anything beyond the most minimal support for right-to-left languages.

    Aside: it's nice that the site checks <bdi>, but dir/direction is much more widely used in practice and should be added.

  • jobigoud 5 years ago

    It's convenient for underline, bold or italics in some long winded messages.

    • swalladge 5 years ago

      That's why we have lightweight markup syntaxes like markdown.

      • krapp 5 years ago

        Markdown is a lightweight syntax for writing and generating HTML, like BBCode. It's not an alternative syntax to HTML.

        • Moru 5 years ago

          Markdown is designed to be readable without encoding it as HTML though, so is nicely readable on old email clients too.

          • krapp 5 years ago

            Sure, but then it's just plain text, and plain text could be perfectly legible before Markdown came along.

            The only tangible benefit Markdown provides is letting people write HTML who don't like the aesthetics of HTML tags.

            • swalladge 5 years ago

              The idea is that it gives a standard for semantic markup that can be read as plain text. Lists, highlighted text, block quotes, etc. that is all plain text but easily parsed by humans.

  • Simon_says 5 years ago

    I want to write mathematics in my emails all the time, and sometimes I want to communicate with people who don't yet know LaTeX.

  • ilikehurdles 5 years ago

    HTML emails are a blessing. Receiving them allows me the ability to quickly glance at an email from an unexpected sender and immediately recognize it as a marketing email or cold sales, and send it to the spam folder without needing to read a single word.

  • krapp 5 years ago

    Every reason listed in this subthread, but also tracking gifs and other means of spying on the end user.

    • jraph 5 years ago

      Email clients block remote images by default.

      If an email client does not, it's a bug.

  • dbuder 5 years ago

    I think many people in this thread making their living by sending emails. imo it should be text only, no pictures and links should be treated like pariahs. It is a total nightmare and if you try and set your own mail server up gmail won't deliver your emails.

hiccuphippo 5 years ago

I'm not sure if I want email clients to support more html&css. I kind of like them to be lighter and with less features.

Actually, I'd prefer if they added something like CommonMark and removed HTML.

Sir_Cmpwn 5 years ago

No, you should not use any of these. You should only use plain text.

https://useplaintext.email

  • MayeulC 5 years ago

    Just wondering, what's your opinion on the flowed format? I like it when the recipient uses a smaller screen geometry (phones can be <80 col). And sadly, that page doesn't track this feature...

    • Sir_Cmpwn 5 years ago

      I've yet to use any software which supports flowed, as a sender or recipient. As a recipient I appreciate when flowed is done right and properly hardwraps lines as a fallback. Seems like a decent compromise.

ivanhoe 5 years ago

I've spent a year of my life working on a front-end for visual composer tool for emails, and it was a horrible experience, time-travel back to IE6 era. I wish there was some tool like this back then, I'd probably keep it open in a tab all the time. We desperately need for someone to finally win this mail client war and some standardization to emerge.

  • andrewkdinh 5 years ago

    > We desperately need for someone to finally win this mail client war and some standardization to emerge.

    Like all things, we need competition in this field. The Gmail web interface is already the most prevalent mail client. Because of this, Google can and has already started controlling the future of email. Just look at AMP for email. I agree with standardization, but not by having only one email client.

    • ivanhoe 5 years ago

      Competition is good, but competition creates segmentation, and with mail clients it's already far more crazy than browsers ever were. There are huge differences even between the different versions of the same client, especially across the different platforms - and people still use some really old Outlooks, so you can't ignore them. I've been doing web dev for a long time, ever since the IE4 (there was still NN back then), so I've been through all the craziness of the browser differences, but this is far worse as many clients are rewriting the html and limitations are super strict, you have to inline everything and use all kinds of css hacks.

lozenge 5 years ago

Isn't it time for desktop clients to embed a real rendering engine? The isolation on them has reached a good level.

  • jcranmer 5 years ago

    Every GUI desktop client I'm aware of embeds a real rendering engine. The difficult one is Outlook, because Microsoft made a conscious decision that compatibility between Outlook and Word was more important than between Outlook and web browsers. I believe the Word/Outlook HTML engine was based on IE 5.5.

    • chrismorgan 5 years ago

      The MSO renderer is a buggy and incomplete implementation of HTML 3.2, and I think high-DPI support is the only change of any substance at all in the last twenty years.

    • lozenge 5 years ago

      They could switch depending on Doctype- it wouldn't be the first time they've done it...

  • AgloeDreams 5 years ago

    Apple's mail clients use Webkit under it all, basically Safari, that's why the scores are so high. It's actually an interesting story, In the book `Creative Selection`, Webkit and Apple Mail were really Chicken and Egg-like, with the two being developed for each other with the HTML Editing logic in Mail being the basis of all text fields in iPhone.

  • canofbars 5 years ago

    Thunderbird had the best rendering engine of them all last time I checked with the microsoft ones being worse. Even if they did embed a real rendering engine you still have to deal with all those people using office 2010

  • implr 5 years ago

    KMail uses QtWebEngine, which is effectively Chromium.

jcranmer 5 years ago

This resource would be more useful if it also indicated support for relevant email-only features:

* Blocking of remote resource loads

* Which resources can be loaded via multipart/related and cid: links.

* How are doctype-less HTML bodies loaded

* "Leaking" of HTML parts in a multipart/mixed message

volument 5 years ago

This is good! I have searched for this actually.

However this seems to lack the most important thing (for me): the global usage percentage of a particular feature, which is the #1 deciding factor whether to use a HTML/CSS feature or not.

  • longwave 5 years ago

    I think that would be difficult to calculate accurately. We can collect user-agent statistics from browsers but mail clients don't have an equivalent when reading mail.

    • volument 5 years ago

      A rough estimate would satisfy me at least. Seems Litmus has farily broad statistics from 823 million opened emails: https://emailclientmarketshare.com/ (August 2019)

      • yyyk 5 years ago

        It's probably strongly tilted towards email clients which don't block external images by default, and email clients used by people who are more likely to be targets of a marketing campaign (i.e. richer 1st world people).

    • u801e 5 years ago

      A number of email clients will add a header line that identifies them to every email that's sent.

      • jcranmer 5 years ago

        The problem is that you don't care about email clients as distributed by senders, you care about the distribution of recipients. Especially if you're a marketer trying to gauge what kind of HTML you can use in your email.

        The only people who can really use the headers to identify which email clients are in use are people who maintain very large ISPs. Although, even then, keeping track of the results of the IMAP ID command are probably more useful.

ggm 5 years ago

Not one mention of FLOW TEXT Issues.

> Nor, the MS quoting issue.

-G

upofadown 5 years ago

>CSS

The last thing I want is for someone else to control the appearance of my email...

  • ken 5 years ago

    Good news! The "C" means you can have the final word.

asadkn 5 years ago

This is very cool. One feature I'd like is the market share report that caniuse has for each listing.

I currently rely on https://emailclientmarketshare.com/ (by Litmus) for this but if someone's aware of a better data source, I'd like to know.

  • jcranmer 5 years ago

    Tracking market share of email clients is very difficult. To capture browsers, all you have to do is beg server logs off of the largest websites, and you can derive statistics for your own user base by crawling your own server logs.

    But email? The usual way statistics are collected are by embedding 1×1 tracking pixels in email messages and noting who requests those images. But that will undercount any email client that has the option to refuse to load remote images, especially any one that turns that option on by default (such as Thunderbird). Another way is to look at the headers of large corpora of email, but the only ones that are publicly available are going to be mailing list archives, which will tend to have a more skewed distribution.

tannhaeuser 5 years ago

Will be very helpful in building an SGML DTD grammar for the HTML subset usable in emails, like I did with regular HTML [1]. CSS, though ... will have to wait for a little longer.

[1]: http://sgmljs.net

WoodenChair 5 years ago

I don’t see emoji covered yet, but I have had real issues with gmail not recognizing some Apple-okay emoji or displaying them with extraneous symbols.

Avamander 5 years ago

Hope KMail and Protonmail get added as well.

philmander 5 years ago

I needed this 14 years ago

guhbml 5 years ago

Learn about email related information networks

chrisnager 5 years ago

Such a great idea. Thank you!

Thomaschaaf 5 years ago

For me discovering https://mjml.io/ was the best thing as it takes away the pain of having to think about all the nitpicks of the different email clients and abstracts it into it's own little markup language.

It supports responsive email designs and has many examples which you can alter to your needs.

You can see the power here: https://mjml.io/try-it-live the basic 15 line example expands to 188 lines of html so that it looks the same everywhere.

  • mfontani 5 years ago

    Have you tried https://zurb.com/ink/index.php ? Seems similar, and a bit older

    • emilsedgh 5 years ago

      They are very, very different things.

      Zurb Email is like Bootstrap/Zurb Foundation, for email. They are common styles that apply to your HTML.

      MJML, in other hand, is not HTML. You write MJML, instead of HTML, and it compiles to HTML.

      It's really fantastic.

      • mfontani 5 years ago

        With ink (well, inky) I write an email using things like "row", "columns", "spacer" etc. and then a process converts those to HTML+CSS, then another inlines the CSS.

        It doesn't seem much different to me.

droithomme 5 years ago

User feedback: I fiddled with this for a few minutes and could not make heads or tails of it.