mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Allow to attach files to order confirmation email (#2384)
Co-authored-by: Richard Schreiber <schreiber@rami.io>
This commit is contained in:
@@ -941,7 +941,10 @@ def _order_placed_email(event: Event, order: Order, pprov: BasePaymentProvider,
|
||||
log_entry,
|
||||
invoices=[invoice] if invoice and event.settings.invoice_email_attachment else [],
|
||||
attach_tickets=True,
|
||||
attach_ical=event.settings.mail_attach_ical
|
||||
attach_ical=event.settings.mail_attach_ical,
|
||||
attach_other_files=filter(lambda a: a, [
|
||||
event.settings.get('mail_attachment_new_order', as_type=str, default='')[len('file://'):]
|
||||
]),
|
||||
)
|
||||
except SendMailException:
|
||||
logger.exception('Order received email could not be sent')
|
||||
@@ -958,7 +961,10 @@ def _order_placed_email_attendee(event: Event, order: Order, position: OrderPosi
|
||||
invoices=[],
|
||||
attach_tickets=True,
|
||||
position=position,
|
||||
attach_ical=event.settings.mail_attach_ical
|
||||
attach_ical=event.settings.mail_attach_ical,
|
||||
attach_other_files=filter(lambda a: a, [
|
||||
event.settings.get('mail_attachment_new_order', as_type=str, default='')[len('file://'):]
|
||||
]),
|
||||
)
|
||||
except SendMailException:
|
||||
logger.exception('Order received email could not be sent to attendee')
|
||||
|
||||
Reference in New Issue
Block a user