Changes between Initial Version and Version 1 of Ticket #37429


Ignore:
Timestamp:
Oct 15, 2026, 12:56:33 PM (22 hours ago)
Author:
jddupas
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #37429 – Description

    initial v1  
    1616I tried to create the HTML + image part using a MIMEMultipart("related"), but there is no way to attach it to the Django EmailMultiAlternatives.
    1717
    18 The attach_alternative does not support taking a MimePart as content. It requires a content-type, and if this is text, in _add_bodies(), it calls add_alternative with a charset parameter, and fails as the charset argument is not supported by the content manager when inserting a MimePart.
    19 
    20 When passing something else as content type, it convert the whole MimePart into base64 and insert it unstructured.
     18The attach_alternative() method does not support taking a MimePart as content parameter. It requires a content-type.
     19If the content-type is text, in _add_bodies(), it calls add_alternative() with a charset parameter, and fails as the charset argument is not supported by the content manager when inserting a MimePart.
     20If the content-type is something else, _add_bodies() converts the whole MimePart into base64 and insert it unstructured.
    2121 
    2222If I use the attach() method instead, the part is properly inserted, but the whole messages switch to mixed content-type, and not alternative content-type.
Back to Top