[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

Henning von Bargen report at bugs.python.org
Fri Dec 16 11:00:08 EST 2016


Henning von Bargen added the comment:

OK, I understand the arguments. 
If I understand correctly, this will be fixed in one way or another in Python 3.6 or 3.7.
For Python 2.7, this will not be fixed (so I have to work around this somehow, should be quite easy).
I think that at least the documentation and the examples for smtplib should be updated.

The doc should make it clear that the message is passed "as-is" and it's the caller's reponsibility to create a valid message string.

The examples at https://docs.python.org/2/library/email-examples.html should note which header fields are required by RFC 5322 and provide an example.

----------

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


More information about the Python-bugs-list mailing list