Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not include both text/plain and text/html versions. #2

Closed
jgerigmeyer opened this issue Oct 7, 2017 · 1 comment
Closed

Does not include both text/plain and text/html versions. #2

jgerigmeyer opened this issue Oct 7, 2017 · 1 comment

Comments

@jgerigmeyer
Copy link

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.

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 and html_message args should include both content types.

@sklarsa
Copy link
Owner

sklarsa commented Oct 7, 2017

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.

@sklarsa sklarsa closed this as completed Oct 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants