-
Notifications
You must be signed in to change notification settings - Fork 56
Description
I use envelopes in our project.
I found a bug:some attachment disappear in some email client (Airmail exactly)when I send email use envelopes.
I try to fix this bug,and I realize the following source is origin
https://github.com/tomekwojcik/envelopes/blob/master/envelopes%2Fenvelope.py#L276
msg = MIMEMultipart('alternative')I inherit envelopes class and rewrite to_mime_message() function,then bug fixed
msg = MIMEMultipart('mixed')
RFC 1341 7.2.3 say:
The multipart/alternative type is syntactically identical to multipart/mixed, but the semantics are different. In particular, each of the parts is an "alternative" version of the same information. User agents should recognize that the content of the various parts are interchangeable. The user agent should either choose the "best" type based on the user's environment and preferences, or offer the user the available alternatives. In general, choosing the best type means displaying only the LAST part that can be displayed.
So why envelopes project use multipart/alternative type instead multipart/mixed?Is it a bug?