Browse Source

replace the "ra+string@simplelogin.co" by the alias

Son NK 5 years ago
parent
commit
b84b7c332e
1 changed files with 4 additions and 0 deletions
  1. 4 0
      email_handler.py

+ 4 - 0
email_handler.py

@@ -563,6 +563,10 @@ def handle_reply(envelope, smtp: SMTP, msg: Message, rcpt_to: str) -> (bool, str
         if custom_domain.dkim_verified:
         if custom_domain.dkim_verified:
             add_dkim_signature(msg, alias_domain)
             add_dkim_signature(msg, alias_domain)
 
 
+    # replace the "ra+string@simplelogin.co" by the alias in the email body
+    # as this is usually included in when replying
+    msg.replace(reply_email.encode(), alias.encode())
+
     smtp.sendmail(
     smtp.sendmail(
         alias.email,
         alias.email,
         contact.website_email,
         contact.website_email,