diff --git a/src/pretix/base/services/mail.py b/src/pretix/base/services/mail.py index b4c9731e5..76a1c5ba6 100644 --- a/src/pretix/base/services/mail.py +++ b/src/pretix/base/services/mail.py @@ -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()