Plaintext emails. This artifact of the times long gone, right? Not necessarily—plaintext emails are actively used in e.g. FOSS software mailing lists. And, if one’s into this type of communication, they’ll inevitably notice this: Plaintext email formatting. Asterisks, signatures, hyphenated lists.
Being a standard freak that I am, I wondered: are these spec-ed anywhere? No, not really. The only reasonable resource on plaintext email formatting I was able to find was this Ed Mullen’s post regarding Thunderbird/Mozilla Structured Text. And even that lists mere four formatting directives.
So I bit the bullet and decided I must list all the formatting conventions. With the support for these in all email clients I can get my hands on.
Here’s a sample email I sent to myself to test formatting. The tested formatting comes mainly from Markdown and Org. And my meager experience reading emails on FOSS projects’ mailing lists.
# Heading ** Heading * Heading =================== Mozilla structured text: *This text* is bold or otherwise emphasized /This text/ should be italicized _This text_ has underlines |This text| should be formatted as code Markdown conventions: `This text` will maybe be formatted as code `This text' is an old code convention, might work as well Maybe +this text+ is crossed out? Okay, ~this text~ must be crossed out > Quote, a typical convention > for listing the other’s text, > usually coming from previous email. Code blocks: int main() { // Put your code here: return 0; } ``` int main() { // Put your code here: return 0; } ``` Now, links: [some link](https://aartaka.me) <https://aartaka.me> [[https://aartaka.me][some link]] <pre> Some inline HTML </pre> -- Artyom Bologov https://aartaka.me
And here’re the support tables for text-level elements:
And for block elements:
So Emacs and Thunderbird seem to respect the historic conventions. While others interpret plaintext emails more or less verbatim. With Gmail and Mail.app going as far as removing some essentials. A shame. Making one tiptoe around incompatibilities is not kind.
Given this spotty support for plaintext formatting, what should one use? Should they even? Regardless of the need for it, here’s what I consider safe to use for formatting in (plaintext) emails:
I can’t stop saying this, so here we go again: Don’t use text-level elements in HTML and elsewhere! They are not announced by screen readers and introduce a lot of clutter. Better use literary methods for emphasis and other purposes. But who am I to stop you? Go all in on bold and underline if you must.
This post and these formatting elements are not much, but at least email formatting is a charted path now. (I sure would’ve benefited from a post like this joining GNU and Suckless mailing lists.) I hope I helped you understand what plaintext emails can and cannot do. Good emailing!
Most (all?) email clients support
For other clients, a more standard syntax of
RFC 1341 MIME
might work better:
In any case, one can inject HTML into “plaintext” emails!
Just that it’s a relatively obscure feature, forgotten and hidden as much as plaintext formatting.
<#multipart type=mixed>
<#part type=text/plain>
This is a plain text part.
<#part type=text/html>
<pre>
heloo
there
</pre>
<center>This is a centered enriched part</center>
<#/multipart>
hello *there* _you_ /person/!
Content-Type: multipart/mixed; boundary="HTMLHTMLHTML"
--HTMLHTMLHTML
This is a plain text part.
--HTMLHTMLHTML
Content-Type: text/html
<pre>
block
block
block
</pre>
<center>This is a centered enriched part</center>
--HTMLHTMLHTML
hello *there* _you_ /person/!
--HTMLHTMLHTML--