From 3a845af2fa8cff3c8428af04a7f3a48caf44b997 Mon Sep 17 00:00:00 2001 From: Son NK <> Date: Sun, 5 Apr 2020 12:00:01 +0200 Subject: [PATCH] use website_email instead of website_from in spam-email --- email_handler.py | 6 ++---- templates/emails/transactional/spam-email.txt | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/email_handler.py b/email_handler.py index 2bfb30c3..58e3a8e4 100644 --- a/email_handler.py +++ b/email_handler.py @@ -710,17 +710,16 @@ def handle_spam( LOG.d( "Inform user %s about spam email sent by %s to alias %s", user, - contact.website_from, + contact.website_email, alias.email, ) send_email( mailbox_email, - f"Email from {contact.website_from} to {alias.email} is detected as spam", + f"Email from {contact.website_email} to {alias.email} is detected as spam", render( "transactional/spam-email.txt", name=user.name, alias=alias, - website_from=contact.website_from, website_email=contact.website_email, disable_alias_link=disable_alias_link, refused_email_url=refused_email_url, @@ -729,7 +728,6 @@ def handle_spam( "transactional/spam-email.html", name=user.name, alias=alias, - website_from=contact.website_from, website_email=contact.website_email, disable_alias_link=disable_alias_link, refused_email_url=refused_email_url, diff --git a/templates/emails/transactional/spam-email.txt b/templates/emails/transactional/spam-email.txt index c11b1a76..a797aee9 100644 --- a/templates/emails/transactional/spam-email.txt +++ b/templates/emails/transactional/spam-email.txt @@ -1,6 +1,6 @@ Hi {{name}} -An email sent to your alias {{alias.email}} from {{website_from}} is detected as spam by our Spam Detection Engine (SpamAssassin). +An email sent to your alias {{alias.email}} from {{website_email}} is detected as spam by our Spam Detection Engine (SpamAssassin). In most of the cases, the email will be refused by your email provider.