Fixes a HTML content problem uncovered from django-post-office 3#82
Merged
nicholasserra merged 2 commits intothemartorana:masterfrom Jan 18, 2020
Merged
Conversation
Allows for sending EmailMultiAlternatives messages with content_subtype html and without text/html alternative
clickonchris
commented
Jan 15, 2020
| break | ||
|
|
||
| elif getattr(message, 'content_subtype', None) == 'html': | ||
| if getattr(message, 'content_subtype', None) == 'html': |
Contributor
Author
There was a problem hiding this comment.
this is the only substantial change. The rest is just django 2 wiring and tests
Collaborator
|
Hey Chris, thanks for the PR! I'll check this out early next week. Looks good on quick peek. To be clear, the issue was that you couldn't have a EmailMultiAlternatives message send without text/html? |
Contributor
Author
|
you’re welcome. The issue my team experienced was- with Django post office
if you have html content but no text content it was sending the html AS
text so the recipient got a plain text email full of html markup.
I.o.w EmailMultiAlternative with text/html content subtype but *without* a
text/html alternative defined was being treated as a plain text email even
if it contained html content
…On Fri, Jan 17, 2020 at 5:31 PM Nicholas Serra ***@***.***> wrote:
Hey Chris, thanks for the PR! I'll check this out early next week. Looks
good on quick peek.
To be clear, the issue was that you couldn't have a EmailMultiAlternatives
message send without text/html?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#82?email_source=notifications&email_token=AAC273RBRVSMDVFHEUZJHGDQ6I5T7A5CNFSM4KHIKT7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJJIRPQ#issuecomment-575834302>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC273XO4B3OZM73RQUMFQ3Q6I5T7ANCNFSM4KHIKT7A>
.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allows for sending EmailMultiAlternatives messages with content_subtype html and without text/html alternative
tests mimic django-post-office 3 implementation here
https://github.com/ui/django-post_office/blob/v3.2.1/post_office/models.py#L126