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

Support "content_subtype" EmailMultiAlternatives when use dict in serialization #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gianbot
Copy link

@gianbot gianbot commented Oct 13, 2021

According with Django documentation:
https://docs.djangoproject.com/en/3.2/topics/email/#sending-alternative-content-types

By default, the MIME type of the body parameter in an EmailMessage is "text/plain". It is good practice to leave this alone, because it guarantees that any recipient will be able to read the email, regardless of their mail client. However, if you are confident that your recipients can handle an alternative content type, you can use the content_subtype attribute on the EmailMessage class to change the main content type. The major type will always be "text", but you can change the subtype

With this pull request we add content_subtype in to_dict and from_dict utils function to handle different content type when using DJANGO_Q_EMAIL_USE_DICTS is True.

@gianbot gianbot marked this pull request as ready for review October 13, 2021 17:58
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

Successfully merging this pull request may close these issues.

2 participants