mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Change handling of attach size to match earlier behaviour
This commit is contained in:
@@ -412,8 +412,9 @@ def mail_send_task(self, *args, to: List[str], subject: str, body: str, html: st
|
|||||||
logger.exception('Could not attach invoice to email')
|
logger.exception('Could not attach invoice to email')
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if attach_size < settings.FILE_UPLOAD_MAX_SIZE_EMAIL_ATTACHMENT:
|
if attach_size < settings.FILE_UPLOAD_MAX_SIZE_EMAIL_ATTACHMENT - 1:
|
||||||
# Do not attach more than 4MB, it will bounce way to often.
|
# 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:
|
for a in args:
|
||||||
try:
|
try:
|
||||||
email.attach(*a)
|
email.attach(*a)
|
||||||
|
|||||||
Reference in New Issue
Block a user