forked from CGM_Public/pretix_original
Sendmail plugin: Allow to attach a file to emails (#1814)
* sendmail: allow to attach files to emails * Fix mixup of model objects and model IDs * Attach to order-level emails, not only position-level emails * Give attachments a proper file type * Add a warning note about higher spam chances Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
This commit is contained in:
@@ -231,7 +231,7 @@ def mail(email: Union[str, Sequence[str]], subject: str, template: Union[str, La
|
||||
attach_tickets=attach_tickets,
|
||||
attach_ical=attach_ical,
|
||||
user=user.pk if user else None,
|
||||
attach_cached_files=[cf.id for cf in attach_cached_files] if attach_cached_files else [],
|
||||
attach_cached_files=[(cf.id if isinstance(cf, CachedFile) else cf) for cf in attach_cached_files] if attach_cached_files else [],
|
||||
)
|
||||
|
||||
if invoices:
|
||||
|
||||
Reference in New Issue
Block a user