Allow to add multiple Bcc addresses

This commit is contained in:
Raphael Michel
2019-05-14 10:18:09 +02:00
parent 2c7cefea35
commit 6ef3603d9f
2 changed files with 15 additions and 5 deletions

View File

@@ -111,7 +111,8 @@ def mail(email: str, subject: str, template: Union[str, LazyI18nString],
if event:
renderer = event.get_html_mail_renderer()
if event.settings.mail_bcc:
bcc.append(event.settings.mail_bcc)
for bcc_mail in event.settings.mail_bcc.split(','):
bcc.append(bcc_mail.strip())
if event.settings.mail_from == settings.DEFAULT_FROM_EMAIL and event.settings.contact_mail and not headers.get('Reply-To'):
headers['Reply-To'] = event.settings.contact_mail