logo

drewdevault.com

[mirror] blog and personal website of Drew DeVault git clone https://hacktivis.me/git/mirror/drewdevault.com.git

Please-use-text-plain-for-emails.md (5733B)


  1. ---
  2. date: 2016-04-11
  3. # vim: tw=80
  4. title: Please use text/plain for email
  5. layout: post
  6. tags: [mail]
  7. ---
  8. A lot of people have come to hate email, and not without good reason. I don't
  9. hate using email, and I attribute this to better email habits. Unfortunately,
  10. most email clients these days lead users into bad habits that probably
  11. contribute to the sad state of email in 2016. The biggest problem with email is
  12. the widespread use of HTML email.
  13. Compare email to snail mail. You probably throw out most of the mail you get -
  14. it's all junk, ads. Think about the difference between snail mail you read and
  15. snail mail you throw out. Chances are, the mail you throw out is flashy flyers
  16. and spam that's carefully laid out by a designer and full of eye candy (kind of
  17. like many HTML emails). However, if you receive a letter from a friend it's
  18. probably going to be a lot less flashy - just text on a page. Reading letters
  19. like this is pleasant and welcome. Emails should be more like this.
  20. I consider this the basic argument for plaintext emails - they make email
  21. better. There are more specific problems with HTML emails that I can give,
  22. though (not to mention the fact that I read emails [on
  23. this](https://drewdevault.com/2016/03/22/Integrating-a-VT220-into-my-life.html)
  24. now).
  25. ## What's wrong with HTML email
  26. **Tracking images** are images that are included in HTML emails with <img
  27. /> tags. These images have URLs with unique IDs in them that hit remote
  28. servers and let them know that you opened the email, along with various details
  29. about your mail client and such. This is a form of tracking, which many people
  30. go to great lengths to prevent with tools like
  31. [uBlock](https://github.com/gorhill/uBlock). Most email clients recognize this,
  32. and actually *block* images from being shown without explicit user consent. If
  33. your images aren't even being shown, then why include them? Tracking users is
  34. evil.
  35. Many **vulnerabilities** in mail clients also stem from rendering HTML email.
  36. Luckily, no mail clients have JavaScript enabled on their HTML email renderers.
  37. However, security issues related to HTML emails are still found quite often in
  38. mail clients. I don't want to view this crap (and I don't).
  39. HTML email also makes **phishing** much easier. I've often received HTML emails
  40. with links that hide their true intent by using a different href than their text
  41. would suggest (and almost always with a tracking code added, ugh). They are also
  42. **incompatible** with many email-based workflows, such as inline quoting,
  43. mailing list participation, and sending & working with source code patches.
  44. ## Good habits for plaintext emails
  45. Some nice things are possible when you choose to use plaintext emails. Remember
  46. before when I was comparing emails to snail mail letters? Well, let's continue
  47. those comparisons. Popular email clients of 2016 have thoroughly bastardized
  48. email, but here's what it once was and perhaps what it could be today.
  49. The common mail client today uses the abhorrent "[top
  50. posting](https://en.wikipedia.org/wiki/Posting_style#Top-posting)" format, where
  51. the entire previous message is dumped underneath your reply. As the usual quote
  52. goes:
  53. >A: Because it messes up the order in which people normally read text.
  54. >
  55. >Q: Why is top-posting such a bad thing?
  56. >
  57. >A: Top-posting.
  58. >
  59. >Q: What is the most annoying thing in e-mail?
  60. A better way to write emails is the same way you write a letter to send via
  61. snail mail. Would you photocopy the entire history of your correspondence and
  62. staple it to your response? After a while you would start paying more for the
  63. weight! Though bandwidth seems cheap now, the habit is still silly. Instead of
  64. copying the entire conversation into your email, quote only the relevant parts
  65. and respond to them inline. For example, let's say I receive this email:
  66. Hi Drew!
  67. Could you take a look at the server this afternoon? I think it's having some
  68. issues with nginx.
  69. I also took care of the upgrades you asked for last night. Sorry it took so
  70. long!
  71. --
  72. John Doe
  73. The best way to respond to this would be:
  74. Hi John!
  75. >Could you take a look at the server this afternoon? I think it's having some
  76. >issues with nginx.
  77. No problem. I just had a quick look now and nginx was busted. Should be
  78. working now.
  79. >I also took care of the upgrades you asked for last night. Sorry it took so
  80. >long!
  81. Thanks!
  82. --
  83. Drew DeVault
  84. John might follow up with this:
  85. >Should be working now.
  86. Yep, seems to be up. Thanks!
  87. --
  88. John Doe
  89. Much better if you ask me. This works particularly well on mailing lists for
  90. open source projects, where you send a patch and reviewers will respond by
  91. quoting specific parts of your patch and leaving feedback. Just treat emails
  92. like letters!
  93. ## Multipart emails
  94. I think there are nothing but negatives to HTML email. I use
  95. [mutt](http://www.mutt.org/) to read email, which doesn't even render HTML
  96. emails and allows me to compose emails with Vim. But if you absolutely insist on
  97. using HTML emails, please use [multipart
  98. emails](https://en.wikipedia.org/wiki/MIME#Multipart_messages). If you're
  99. sending automated emails, your programming language likely contains a mechanism
  100. to facilitate this. The idea is that you send an alternative text/plain body for
  101. your email. Be sure that this body contains all of the information of the HTML
  102. version. If you do this, I will at least be willing to read your emails.
  103. ## How do I use plaintext emails?
  104. Your mail client should have an option for composing emails with plaintext. Look
  105. through your settings for it and it'll change the default. Then you're free!
  106. Tell your friends to do the same, and your email life will be happier.