Email module, how to add header to the top of an email?
Karlheinz Klingbeil
karlheinz.klingbeil at gmx.net
Sat Jan 26 05:10:14 EST 2008
Am 26.01.2008, 01:46 Uhr, schrieb David Erickson <halcyon1981 at gmail.com>:
> It is important to note that the header fields are not guaranteed
> to
> be in a particular order. They may appear in any order, and they
> have been known to be reordered occasionally when transported over
> the Internet. However, for the purposes of this standard, header
> fields SHOULD NOT be reordered when a message is transported or
> transformed. More importantly, the trace header fields and resent
> header fields MUST NOT be reordered, and SHOULD be kept in blocks
> prepended to the message. See sections 3.6.6 and 3.6.7 for more
> information.
>
> Trace header fields are not to be ordered, and should be prepended
> when added to a message. Now that said I am not trying to track
> anything, I simply want to prepend my additional headers onto the top
> of the email, and seem to be unable to do that via the API, which I
> think ought to be possible. If for example I was writing some kind of
> an SMTP server with Python and needed to add said trace headers they
> would need to be prepended, and currently cannot be (without doing it
> by hand).
>
> -David
You're right on that point, though it says clearly "It is important to
note that the header fields are not guaranteed to be in a particular
order."
So it's in my opinion a good idea not to expect headers to be ordered and
add headers in a way which doesn't conflict with a *possible* reordering.
--
Greetz, lunqual - http://www.lunqual.de
http://www.42pixels.de - Bilder
http://www.rezeptbuch-pro.de - Software für den Destillateur
More information about the Python-list
mailing list