Closed jgerigmeyer closed 7 years ago
Looks like that was an oversight on my part. I made the relevant fix, incremented the version to 0.6.7, and just published the package to PyPi. Thanks for pointing this out! Let me know if you have any additional problems related to this change.
After upgrading from sendgrid-django, our emails used to be
multipart/alternative
with bothtext/plain
andtext/html
content included, but are now simplytext/html
-- the plain text version is no longer included.In sendgrid-django, an email that inherited from
EmailMultiAlternatives
would trigger bothmail.add_content(Content("text/plain", email.body))
andmail.add_content(Content(alt[1], alt[0]))
. It appears that in django-sendgrid-v5, the same email only triggersmail.add_content(Content(alt[1], alt[0]))
without adding thetext/plain
content.The relevant diff seems to be https://github.com/elbuo8/sendgrid-django/blob/master/sgbackend/mail.py#L87-L91 vs https://github.com/sklarsa/django-sendgrid-v5/blob/master/sendgrid_backend/mail.py#L136-L144.
Is this an intentional change? My understanding of Django mail implies that a message with both
message
andhtml_message
args should include both content types.