From 2e674916c22dbd3ea8c1837bdd6f506204efc40f Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Wed, 15 Oct 2025 13:33:48 +0200 Subject: [PATCH] Fix email attachment limit to actually be 4MB as documented, not 5 MB (Z#23210802) (#5546) --- src/pretix/base/services/mail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pretix/base/services/mail.py b/src/pretix/base/services/mail.py index 61c4bf685..65041e2fc 100644 --- a/src/pretix/base/services/mail.py +++ b/src/pretix/base/services/mail.py @@ -470,7 +470,7 @@ def mail_send_task(self, *args, to: List[str], subject: str, body: str, html: st logger.exception('Could not attach invoice to email') pass - if attach_size < settings.FILE_UPLOAD_MAX_SIZE_EMAIL_ATTACHMENT - 1: + if attach_size < settings.FILE_UPLOAD_MAX_SIZE_EMAIL_ATTACHMENT - 1024 * 1024: # Do not attach more than (limit - 1 MB) in tickets (1MB space for invoice, email itself, …), # it will bounce way to often. for a in args: