Hi, I want to set the "Return-Path" header for the MIME message I am sending using Python. Basically, I tried something like this:
message = MIMEMultipart()
message.add_header("Return-Path", "something@something.com")
smtplib.SMTP().sendmail(from, to, message.as_string())
The message I receive has a Return-Path header set to the same content as From, even if I explicitly add a Return-Path header.
How can I set the "Return-Path" header for a MIME message sent via smtplib sendmail in Python?
Thanks in advance.
source
share