You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading from sendgrid-django, our emails used to be multipart/alternative with both text/plain and text/html content included, but are now simply text/html -- the plain text version is no longer included.
In sendgrid-django, an email that inherited from EmailMultiAlternatives would trigger both mail.add_content(Content("text/plain", email.body)) and mail.add_content(Content(alt[1], alt[0])). It appears that in django-sendgrid-v5, the same email only triggers mail.add_content(Content(alt[1], alt[0])) without adding the text/plain content.
Is this an intentional change? My understanding of Django mail implies that a message with both message and html_message args should include both content types.
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: