fix: RFC822 From
and To
This commit is contained in:
parent
993ca50352
commit
e54d35a9d7
7
main.py
7
main.py
@ -115,11 +115,8 @@ def forward_emails(account_config, emails, logger):
|
|||||||
to_name, to_address = parseaddr(original_msg['To'])
|
to_name, to_address = parseaddr(original_msg['To'])
|
||||||
to_name = decode_mime_words(to_name)
|
to_name = decode_mime_words(to_name)
|
||||||
msg = MIMEMultipart('mixed')
|
msg = MIMEMultipart('mixed')
|
||||||
if provider_in(account_config['email'], ["yandex.com", "mail.ru", "internet.ru", "bk.ru", "inbox.ru", "list.ru"]):
|
msg['From'] = f'"{from_name} ({from_address}) via Forwarder" <{account_config["email"]}>'
|
||||||
msg['From'] = f"Forwarder <{account_config['email']}>"
|
msg['To'] = f'"{to_name} ({to_address}) via Forwarder" <{recipient}>'
|
||||||
else:
|
|
||||||
msg['From'] = f"{from_name} ({from_address}) via Forwarder <{account_config['email']}>"
|
|
||||||
msg['To'] = f"{to_name} ({to_address}) via Forwarder <{recipient}>"
|
|
||||||
original_subject = decode_mime_words(original_msg['Subject'])
|
original_subject = decode_mime_words(original_msg['Subject'])
|
||||||
msg['Subject'] = original_subject
|
msg['Subject'] = original_subject
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user