浏览代码

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

Son NK 5 年之前
父节点
当前提交
b84b7c332e
共有 1 个文件被更改,包括 4 次插入0 次删除
  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:
             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(
         alias.email,
         contact.website_email,