Explorar el Código

fix to_header

Son NK hace 5 años
padre
commit
c6138828c2
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      email_handler.py

+ 2 - 2
email_handler.py

@@ -342,9 +342,9 @@ def handle_forward(envelope, smtp: SMTP, msg: Message, rcpt_to: str) -> str:
         if should_append_alias(msg, alias.email):
         if should_append_alias(msg, alias.email):
             LOG.d("append alias %s  to TO header %s", alias, msg["To"])
             LOG.d("append alias %s  to TO header %s", alias, msg["To"])
             if msg["To"]:
             if msg["To"]:
-                to_header = msg["To"] + "," + alias
+                to_header = msg["To"] + "," + alias.email
             else:
             else:
-                to_header = alias
+                to_header = alias.email
 
 
             add_or_replace_header(msg, "To", to_header)
             add_or_replace_header(msg, "To", to_header)