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
Async email support #11
Comments
Linked to the topic of emails (but not necessarily the same) is perhaps to have a feature to include other email providers as well (e.g., by enabling django-anymail). At the moment, I believe emails in general are only customizable via templates - it would be useful for users to be able to use templates / template IDs from their email providers (like Sendgrid, Mailgun, etc.) which as far as I can tell is impossible now. |
I see this has been mentioned here. Was not aware this is easily achievable with the current setup however? |
You can use your favorite email provider, just follow the anymail 1-2-3.
Yes currently the email templates are customizable only by django templates, it can be enhanced in the future, or you can propose changes and make a pull request :D |
This issue has been automatically marked as stale. It will be closed if no further activity occurs. |
It's a great idea! I want to add something more here. Is it possible to bring some hook-able option so that User can handle email sending part by themselves? For example, I've all the email template in mandrill. So I just wanted to reuse all those templates with the arguments. |
@nazmulhasan85 Yes, you can do that! The easiest way right now is to simply:
Suggestions? What you think? Also, it would be useful to solve #22 along. |
@PedroBern Sounds good Lemme have a look. If i can manage sometime I will definitely jump on it. |
Started to work on this with #33 and adding a new branch,
|
Currently, all emails are sent in the
mixins.py
but would be great to have async support.I think the easiest way to make an optional plug and play support would be creating a new setting to enter a function that wraps each send email call.
Actually it's not an async email support, but make easy to integrate with your own async solution.
Then it accepts a function path"
The task need to accept the email send function and its arguments, usage with celery would be something like this:
Then, in the
mixins.py
, we need to change all send email calls, for example:Of course, to make this work we must import the function from its path in the
settings.py
, probably using:The text was updated successfully, but these errors were encountered: