Browse Source

Vyjmout chyby. Pokus 2. (from je očividně jen string)

middleware_test
Jonas Havelka 4 years ago
parent
commit
7225273956
  1. 2
      various/mail_prefixer.py

2
various/mail_prefixer.py

@ -14,7 +14,7 @@ class PrefixingMailBackend(DjangoSMTPBackend):
for message in messages: for message in messages:
# We hope that this is a django.core.mail.message.EmailMessage # 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.subject = prefix + ' ' + message.subject
message.body = "Bylo by posláno na e-maily: " + str(message.recipients()) + "\n\n" + message.body message.body = "Bylo by posláno na e-maily: " + str(message.recipients()) + "\n\n" + message.body
message.to = settings.TESTOVACI_EMAILOVA_KONFERENCE message.to = settings.TESTOVACI_EMAILOVA_KONFERENCE

Loading…
Cancel
Save