R. David Murray added the comment:

The signature of send_message cannot be changed for backward compatibility 
reasons.  It's signature was not intended to be an extension of the sendmail 
signature.

send_message cannot accept a dictionary, as then it would have to know how to 
format that dictionary into an RFC5322 compliant text string.  Nor can a 
dictionary represent a collection of email headers accurate.  Representing the 
headers and doing the serialization is the email package's job.

It is true that the ehlo_or_helo_if_needed is technically redundant, however, 
what it means is that once you've called any smtplib command you know that has 
been done, even if the subcommand raises an error.  This can make debuging 
easier (consistency of state), at a trivial cost.

The "more than one Resent block" error is explained in the comments.  If you 
want to write the heuristics to remove it, go ahead :)

Looking at that code, I see that I misremembered what it was doing.  I thought 
it was adding Resent-Date if it was missing, but it is instead determining what 
form of address headers it needs to add if Reset-Date is present.  That doesn't 
change the analysis in this issue, though.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28879>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to