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

Please expose the connection argument of the EmailMultiAlternatives constructor #114

Open
serbant opened this issue Oct 31, 2018 · 2 comments

Comments

@serbant
Copy link

serbant commented Oct 31, 2018

This will allow the reuse of a cached connection object for better resource utilization

@fjsj
Copy link
Member

fjsj commented Jun 11, 2021

I think this is already doable if you use the get_templated_email and handle connections/backends yourself.

I know this is a very old issue, but if anyone else sees a similar problem, please comment here. Closing for now.

@fjsj fjsj closed this as completed Jun 11, 2021
@fjsj
Copy link
Member

fjsj commented Jun 11, 2021

What we can do to facilitate custom connections on send_templated_mail is:

  • Change the current connection argument to template_backend
  • Change the current get_connection function inside templated_email/__init__.py to get_default_template_backend
  • Add a new connection argument to send_templated_mail and pass it to template_backend.send

@fjsj fjsj reopened this Jun 11, 2021
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