瀏覽代碼

make should_append_alias case insensitive

Son NK 5 年之前
父節點
當前提交
9a423f3247
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      email_handler.py

+ 2 - 2
email_handler.py

@@ -279,9 +279,9 @@ def generate_reply_email():
 def should_append_alias(msg: Message, address: str):
 def should_append_alias(msg: Message, address: str):
     """whether an alias should be appended to TO header in message"""
     """whether an alias should be appended to TO header in message"""
 
 
-    if msg["To"] and address in msg["To"]:
+    if msg["To"] and address.lower() in msg["To"].lower():
         return False
         return False
-    if msg["Cc"] and address in msg["Cc"]:
+    if msg["Cc"] and address.lower() in msg["Cc"].lower():
         return False
         return False
 
 
     return True
     return True