EmailMultiAlternatives does not properly handle attachments
|Reported by:||loekje||Owned by:||Luke Plant|
|Cc:||patrys@…, walter+django@…||Triage Stage:||Accepted|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
EmailMultiAlternatives does not properly attach (PDF) files. The generated email only contains a multipart/alternative part, whereas in order to additionally support attachments the multipart/alternative part should be wrapped in a multipart/mixed part. This allows for the inclusion of attachments in addition to different alternative views.
I would like to suggest to add this functionality to either the EmailMessage class or to update the EmailMultiAlternatives class to have proper support of both alternative views AND attachments. I have included an example on how to support this behavior. It has been tested to work with Outlook and Thunderbird mail clients.
Change History (15)
comment:2 follow-up: 3 Changed 8 years ago by
|Summary:||EmailMultiAlternatives does not properly attach (PDF) files. → EmailMultiAlternatives does not properly handle attachments|
|Triage Stage:||Unreviewed → Accepted|