Pārlūkot izejas kodu

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

Son NK 5 gadi atpakaļ
vecāks
revīzija
b2f22db9f6

+ 1 - 3
email_handler.py

@@ -640,12 +640,11 @@ def handle_bounce(
         send_email(
             # use user mail here as only user is authenticated to see the refused 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(
                 "transactional/automatic-disable-alias.txt",
                 name=user.name,
                 alias=alias,
-                website_from=contact.website_from,
                 website_email=contact.website_email,
                 refused_email_url=refused_email_url,
                 mailbox_email=mailbox_email,
@@ -654,7 +653,6 @@ def handle_bounce(
                 "transactional/automatic-disable-alias.html",
                 name=user.name,
                 alias=alias,
-                website_from=contact.website_from,
                 website_email=contact.website_email,
                 refused_email_url=refused_email_url,
                 mailbox_email=mailbox_email,

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

@@ -1,6 +1,6 @@
 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.
 You can view this email here: