django-templated-email icon indicating copy to clipboard operation
django-templated-email copied to clipboard

Please expose the connection argument of the EmailMultiAlternatives constructor

Open serbant opened this issue 6 years ago • 2 comments

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

serbant avatar Oct 31 '18 17:10 serbant

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 avatar Jun 11 '21 19:06 fjsj

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 avatar Jun 11 '21 19:06 fjsj