From 7225273956ca82b2635a557a7b6ad4c2c4aef0b1 Mon Sep 17 00:00:00 2001 From: Jonas Havelka Date: Wed, 26 May 2021 00:03:17 +0200 Subject: [PATCH] =?UTF-8?q?Vyjmout=20chyby.=20Pokus=202.=20(from=20je=20o?= =?UTF-8?q?=C4=8Dividn=C4=9B=20jen=20string)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- various/mail_prefixer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/various/mail_prefixer.py b/various/mail_prefixer.py index 456b6be7..05d523e7 100644 --- a/various/mail_prefixer.py +++ b/various/mail_prefixer.py @@ -14,7 +14,7 @@ class PrefixingMailBackend(DjangoSMTPBackend): for message in messages: # We hope that this is a django.core.mail.message.EmailMessage - if len(message.from_email) == 0 or message.from_email[0] != settings.SERVER_EMAIL: + if message.from_email != settings.SERVER_EMAIL: message.subject = prefix + ' ' + message.subject message.body = "Bylo by posláno na e-maily: " + str(message.recipients()) + "\n\n" + message.body message.to = settings.TESTOVACI_EMAILOVA_KONFERENCE