Do I have to expect any problems on the recipientsʼ side if I started sending single-part emails as Content-Type: text/markdown; charset=UTF-8;
according to RFCs 7763 and 7764? I believe it should fall back safely to the default text/plain
.
There are several ways email clients can support Markdown/Commonmark or related languages. I'm talking about transmission and the resulting display here.
Input
- Convert asterisks, underscores etc. the user inputs with their keyboard to HTML tags (or, in theory, any other rich text format) and send the email as a multipart message with
text/plain
andtext/html
. - Like above, but also offer GUI buttons or keyboard shortcuts (e.g.
foo
+ CtrlI ⇒_foo_
) to aid the input of these formats. This is basically a rich text editor that generates a better plain-text fallback than most do currently.
Both of these can use no, inline, side-by-side or before-submission previews of the rendered text.
This is what plugins like Markdown Here can do and some (web)mail clients support natively, e.g. Airmail, Mail Mate, Mailspring, Gmelius, Cypht. Some newsletter, admin, ticket or shop systems that send out emails themselves can also handle markdown input in this way.
Transmission
- Send single-part messages as
text/markdown
instead of the standardtext/plain
, relying on graceful fallback to the latter. This is what I'm asking about! - Send multi-part messages with
text/markdown
instead oftext/html
, basically duplicating thetext/plain
message body. - Send multi-part messages with generated
text/html
andtext/markdown
instead of the usualtext/plain
basic version.
Mail Mate and Groups.io may add a header parameter like this:
Content-Type: text/plain; format=flowed; markup=markdown
Display
- Display received single-part mails that have the appropriate
text/markdown
header set as plain text, as if it weretext/plain
. This is the expected graceful fallback. - Display received single-part or multi-part mails that have the
Content-Type
header set with atext/markdown
type ormarkup=markdown
parameter as rich text with the formatting characters removed. - Display received single-part mails that pass some heuristics to determine they were written according to Markdown or some other LML conventions as rich text with the formatting characters possibly being kept.
Many clients, e.g. Apple Mail, support rich text rendering of a single Markdown feature: block quotations with (possibly nested) >
at the beginning of the line.