HeadlinesBriefing favicon HeadlinesBriefing.com

Stop sending multipart/alternative errors

Hacker News •
×

The author expresses frustration with emails that misuse the multipart/alternative format to send error messages instead of actual content. This format is intended to provide the same information in multiple interchangeable forms, typically plain text and HTML.

When email clients are configured to prefer plain text, or cannot render HTML, they are presented with these error messages as the plain text alternative. This can lead to confusion, as the user may not understand the situation or how to recover the intended content. The author outlines several scenarios where this practice is problematic, whether the user has an ancient client, a MIME-capable client that can't handle HTML, or a client configured to prefer plain text.

The core issue is that these "alternatives" are not actual alternatives but error notifications. If an email system cannot generate a useful plain text version, sending an error message does not help the recipient. The author suggests that if HTML comments are used, they might offer a similarly confusing experience without violating email standards. The proposed solution is simple: stop sending text/plain parts that are not genuine alternatives. This practice, along with sending excessive blank lines or irrelevant code, can also negatively impact spam filters.