mirror of
https://github.com/pretix/pretix.git
synced 2026-04-26 23:52:35 +00:00
Allow mails without HTML
This commit is contained in:
@@ -143,7 +143,8 @@ def mail(email: str, subject: str, template: Union[str, LazyI18nString],
|
||||
def mail_send_task(to: List[str], subject: str, body: str, html: str, sender: str,
|
||||
event: int=None, headers: dict=None) -> bool:
|
||||
email = EmailMultiAlternatives(subject, body, sender, to=to, headers=headers)
|
||||
email.attach_alternative(inline_css(html), "text/html")
|
||||
if html is not None:
|
||||
email.attach_alternative(inline_css(html), "text/html")
|
||||
if event:
|
||||
event = Event.objects.get(id=event)
|
||||
backend = event.get_mail_backend()
|
||||
|
||||
Reference in New Issue
Block a user