From e9cd043760b5c4ea29447c5a26223cfac367f4d2 Mon Sep 17 00:00:00 2001 From: Son NK Date: Sat, 28 Mar 2020 21:20:59 +0100 Subject: [PATCH] do not put alias again when reply all --- email_handler.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/email_handler.py b/email_handler.py index a9cc211a..65b57c80 100644 --- a/email_handler.py +++ b/email_handler.py @@ -38,7 +38,7 @@ from email.mime.application import MIMEApplication from email.mime.multipart import MIMEMultipart from email.parser import Parser from email.policy import SMTPUTF8 -from email.utils import parseaddr, formataddr, getaddresses +from email.utils import parseaddr from io import BytesIO from smtplib import SMTP from typing import Optional @@ -319,7 +319,6 @@ def replace_header_when_reply(msg: Message, alias: Alias, header: str): # no transformation when alias is already in the header if email == alias.email: - new_addrs.append(addr) continue contact = Contact.get_by(reply_email=email)