Add "Received:" header to email msg in correct position?

Ethan Furman ethan at stoneleaf.us
Mon May 5 16:01:29 EDT 2014


On 05/05/2014 12:51 PM, Grant Edwards wrote:
>
> I'm working on a Python app that receives an e-mail message via SMTP,
> does some trivial processing on it, and forwards it to another SMTP
> server.
>
> I'd like to do the polite thing and add a "Received:" header, but I
> can't figure out how to get Python's email module to add it in the
> correct place.  It always ends up at the "bottom" of the headers below
> From: To: etc.  It's supposed to go at the above all the Received:
> headers that where there when I received it.

I don't know that it matters, but which Python version?

--
~Ethan~



More information about the Python-list mailing list