-
Notifications
You must be signed in to change notification settings - Fork 211
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
HTML emails #132
Comments
I can think of a couple ways of doing this. One is having both text and HTML body templates. Another is allowing users to override how the email itself is generated. I'm a bit more partial to this - either it allows people to bring their own HTML email builder and/or basic HTML email handling is added via some new backend classes that ship with the app. For what it's worth, I'm not against making a breaking change like changing the template from |
We could even do both: Let the user provide a .html or .txt version, but also write a new method that returns just the EmailMessage instance. They could then override that if needed. |
This sounds like a good strategy to start. |
Is this fixed? How to we go about sending a custom HTML email?
Where "invitation_body" here is a custom HTML email |
I am implementing HTML emails for a project and noticed that although the email body templates end in .html, they are actually used as text templates. I think the ideal would be to have some default templates but ending in .txt, and letting the user override those as well as providing .html versions. Then if a .html version exists, it will be passed to Django's send_mail function.
Any thoughts on the best way to implement this, since changing from .html to .txt would break existing overrides?
The text was updated successfully, but these errors were encountered: