Explorar o código

add send-from-alias-from-unknown-sender template in html

Son NK %!s(int64=5) %!d(string=hai) anos
pai
achega
27d048f70b

+ 5 - 1
email_handler.py

@@ -604,7 +604,11 @@ def handle_reply(envelope, smtp: SMTP, msg: Message, rcpt_to: str) -> (bool, str
                 sender=envelope.mail_from,
                 sender=envelope.mail_from,
                 reply_email=reply_email,
                 reply_email=reply_email,
             ),
             ),
-            "",
+            render(
+                "transactional/send-from-alias-from-unknown-sender.html",
+                sender=envelope.mail_from,
+                reply_email=reply_email,
+            ),
         )
         )
 
 
         return False, "550 SL ignored"
         return False, "550 SL ignored"

+ 15 - 0
templates/emails/transactional/send-from-alias-from-unknown-sender.html

@@ -0,0 +1,15 @@
+{% extends "base.html" %}
+
+{% block content %}
+  {{ render_text('This is an automated email from SimpleLogin.') }}
+
+  {{ render_text("We have recorded an attempt to send an email from your email <b>" + sender + "</b> to <b>" + reply_email + "</b>.") }}
+
+  {{ render_text(reply_email + 'is a special email address that only receives emails from its authorized user.') }}
+
+  {{ render_text('This user has been also informed of this incident.') }}
+
+  {{ render_text('If you have any question, you can contact us by replying to this email or consult our website at https://simplelogin.io.') }}
+
+  {{ render_text('Regards, <br />SimpleLogin Team.') }}
+{% endblock %}