[issue18139] email module should have a way to prepend and insert headers

Surya K report at bugs.python.org
Tue Mar 4 18:32:48 CET 2014


Surya K added the comment:

Without really making big the in the API, one way of providing a position sensitive methods to enable more organized headers is to have. Having an index based api probably needs `more` discussion and thought!

1. add_header_before('existing-header-name', 'new-name', value)
2. add_header_after('existing-header-name', 'new-name', value)

The `existing-header-name` is again taken by first-found.

If put all routing, forwarded headers, one can always use `add_header_before('From'...)`.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18139>
_______________________________________


More information about the Python-bugs-list mailing list