forked from CGM_Public/pretix_original
Never fail to send an email because of missing attachments
This commit is contained in:
@@ -206,11 +206,14 @@ def mail_send_task(*args, to: List[str], subject: str, body: str, html: str, sen
|
|||||||
else:
|
else:
|
||||||
if attach_tickets:
|
if attach_tickets:
|
||||||
for name, ct in get_tickets_for_order(order):
|
for name, ct in get_tickets_for_order(order):
|
||||||
email.attach(
|
try:
|
||||||
name,
|
email.attach(
|
||||||
ct.file.read(),
|
name,
|
||||||
ct.type
|
ct.file.read(),
|
||||||
)
|
ct.type
|
||||||
|
)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
email = email_filter.send_chained(event, 'message', message=email, order=order)
|
email = email_filter.send_chained(event, 'message', message=email, order=order)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user