Browse Source

use website_email instead of website_from for automatic-disable-alias email

Son NK 5 years ago
parent
commit
b2f22db9f6
2 changed files with 2 additions and 4 deletions
  1. 1 3
      email_handler.py
  2. 1 1
      templates/emails/transactional/automatic-disable-alias.txt

+ 1 - 3
email_handler.py

@@ -640,12 +640,11 @@ def handle_bounce(
         send_email(
         send_email(
             # use user mail here as only user is authenticated to see the refused email
             # use user mail here as only user is authenticated to see the refused email
             user.email,
             user.email,
-            f"Alias {address} has been disabled due to second undelivered email from {contact.website_from}",
+            f"Alias {address} has been disabled due to second undelivered email from {contact.website_email}",
             render(
             render(
                 "transactional/automatic-disable-alias.txt",
                 "transactional/automatic-disable-alias.txt",
                 name=user.name,
                 name=user.name,
                 alias=alias,
                 alias=alias,
-                website_from=contact.website_from,
                 website_email=contact.website_email,
                 website_email=contact.website_email,
                 refused_email_url=refused_email_url,
                 refused_email_url=refused_email_url,
                 mailbox_email=mailbox_email,
                 mailbox_email=mailbox_email,
@@ -654,7 +653,6 @@ def handle_bounce(
                 "transactional/automatic-disable-alias.html",
                 "transactional/automatic-disable-alias.html",
                 name=user.name,
                 name=user.name,
                 alias=alias,
                 alias=alias,
-                website_from=contact.website_from,
                 website_email=contact.website_email,
                 website_email=contact.website_email,
                 refused_email_url=refused_email_url,
                 refused_email_url=refused_email_url,
                 mailbox_email=mailbox_email,
                 mailbox_email=mailbox_email,

+ 1 - 1
templates/emails/transactional/automatic-disable-alias.txt

@@ -1,6 +1,6 @@
 Hi {{name}}
 Hi {{name}}
 
 
-There are at least 2 emails sent to your alias {{alias.email}} from {{website_from}} that have been refused (or bounced) by your mailbox {{mailbox_email}}.
+There are at least 2 emails sent to your alias {{alias.email}} from {{website_email}} that have been refused (or bounced) by your mailbox {{mailbox_email}}.
 
 
 This is usually due to the email being considered as spam by your email provider.
 This is usually due to the email being considered as spam by your email provider.
 You can view this email here:
 You can view this email here: