fix to_header

This commit is contained in:
Son NK 2020-03-19 11:33:21 +01:00 committed by Son NK
parent 8bb485997c
commit 5585173583

View file

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