Browse Source

MailPrefixer: rozdělení podle typu příjemce

middleware_test
MaM Web user 3 years ago
parent
commit
455b0f59a5
  1. 6
      various/mail_prefixer.py

6
various/mail_prefixer.py

@ -16,7 +16,11 @@ class PrefixingMailBackend(DjangoSMTPBackend):
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.body = f"""Bylo by posláno na e-maily:
To: {message.to}
Cc: {message.cc}
Bcc: {message.bcc}
"""+ "\n\n" + message.body
message.to = settings.TESTOVACI_EMAILOVA_KONFERENCE
message.cc = []
message.bcc = []

Loading…
Cancel
Save