Keep original To header line. Do not recreate our own. modified: listfix_filter.py
Brian Barto bartobrian@gmail.com
Thu, 17 Mar 2022 13:25:26 -0400
1 files changed,
1 insertions(+),
2 deletions(-)
jump to
M
listfix_filter.py
→
listfix_filter.py
@@ -108,7 +108,6 @@ return rval
def send_email(to_email, email_contents): p = os.popen(f"/usr/sbin/sendmail -G -i {to_email}", "w") - p.write(f"To: {to_email}\n") for line in email_contents: p.write(line) p.close()@@ -212,7 +211,7 @@ ## Costruct Filtered Email
email_filtered.append(f"From: \"{sender_name} via {list_name}\" <{list_email}>\n") email_filtered.append(f"Reply-To: {list_email}\n") -exclude_headers = ["Subject", "Content-[^:]+", "MIME-Version"] +exclude_headers = ["To", "Subject", "Content-[^:]+", "MIME-Version"] email_filtered.extend(strip_headers(email, exclude_headers)) ## Send emails