Ver código fonte

Not include original email in automatic disable alias email

Son NK 5 anos atrás
pai
commit
0525e5822a

+ 4 - 1
email_handler.py

@@ -614,6 +614,7 @@ def handle_bounce(
                 alias=alias,
                 website_from=forward_email.website_from,
                 website_email=forward_email.website_email,
+                refused_email_url=refused_email_url,
             ),
             render(
                 "transactional/automatic-disable-alias.html",
@@ -621,8 +622,10 @@ def handle_bounce(
                 alias=alias,
                 website_from=forward_email.website_from,
                 website_email=forward_email.website_email,
+                refused_email_url=refused_email_url,
             ),
-            bounced_email=msg,
+            # cannot include bounce email as it can contain spammy text
+            # bounced_email=msg,
         )
 
 

+ 3 - 2
templates/emails/transactional/automatic-disable-alias.html

@@ -5,8 +5,9 @@
   {{ render_text("There are at least 2 emails sent to your alias <b>" + alias + "</b> from <b>" + website_email +
   "</b> that have been <b>refused</b> (or bounced) by your email provider.") }}
 
-  {{ render_text("This is usually due to the email being considered as <b>spam</b> by your email provider.
-  The email is included at the end of this message so you can take a look at its content.") }}
+  {{ render_text("This is usually due to the email being considered as <b>spam</b> by your email provider.") }}
+
+  {{ render_button("View the refused email", refused_email_url) }}
 
   {{ render_text('As security measure, we have <b>disabled</b> the alias ' + alias) }}
 

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

@@ -3,7 +3,9 @@ Hi {{name}}
 There are at least 2 emails sent to your alias {{alias}} from {{website_from}} that have been refused (or bounced) by your email provider.
 
 This is usually due to the email being considered as spam by your email provider.
-The email is included at the end of this message so you can take a look at its content.
+You can view this email here:
+{{ refused_email_url }}
+
 
 As security measure, we have disabled the alias {{alias}}.