refactor email rendering/sending

Issue #1042 resolved
Tay Ray Chuan
created an issue

I've published this as [[ | r 1389 7dda0d16659b]].

A new function {{{satchmo_store.mail.send_store_mail()}}} is added to handle:

  • retrieving of the email address to use in "From:"
  • rendering of message bodies with templates
  • inserting {{{store_name}}} into subjects that need it via string formatting
  • error/exception handling from the actual {{{send_mail()}}} call

No need to get the {{{shop_config}}}, or write try/catch blocks anymore!

As a side-effect, all email sending in satchmo falls back onto using the {{{ADMINS}}} django setting.

PS. I've tested this with the contact form and email registration.

Comments (2)

  1. Log in to comment