Fix #312 -- Bulk-send vouchers via email (#1469)

* Allow to directly bulk-send vouchers via email

* Send mails

* Log messages

* Fix test failures

* Add new test cases
This commit is contained in:
Raphael Michel
2019-10-29 11:53:59 +01:00
committed by GitHub
parent 161f4a8132
commit 1e0e8184c8
10 changed files with 317 additions and 6 deletions

View File

@@ -121,7 +121,7 @@ def mail(email: str, subject: str, template: Union[str, LazyI18nString],
})
renderer = ClassicMailRenderer(None)
content_plain = body_plain = render_mail(template, context)
subject = str(subject).format_map(context)
subject = str(subject).format_map(TolerantDict(context))
sender = sender or (event.settings.get('mail_from') if event else settings.MAIL_FROM)
if event:
sender_name = event.settings.mail_from_name or str(event.name)