MIME multipart/alternative: content part order, plain first
Hi,
Currently, in a MIME multipart/alternative message, the HTML part appears first. This behavior breaks the 'plain/html' switching functionality of alpine.
I haven't found the exact RFC that describing this behavior. But there's some description on Wikipedia:
Since a client is unlikely to want to send a version that is less faithful than the plain text version, this structure places the plain text version (if present) first. This makes life easier for users of clients that do not understand multipart messages.
After I dug into some of my other emails, and found out that plain text usually comes before html part.
Ah, I found some quote from RFC2046:
For fancy text, the sending user agent should put the plainest format first and the richest format last.
NOTE: From an implementor's perspective, it might seem more sensible to reverse this ordering, and have the plainest alternative last. However, placing the plainest alternative first is the friendliest possible option when "multipart/alternative" entities are viewed using a non-MIME-conformant viewer. While this approach does impose some burden on conformant MIME viewers, interoperability with older mail readers was deemed to be more important in this case.
I think the code need to be changed is: email.py:51
Thank you.