For various reasons the email6 work is on temporary hold. But, I've been working on some outstanding email5.1 bugs, and I've got a dilemma.
I introduced smtplib send_message as a convenient way of sending a Message object. I did not, however, fully consider the implications of having done this the way I did it. A bug has been reported that it doesn't follow RFC2822 rules when auto-detecting the sender and sendee addresses. Specifically it ignores Sender and any Resent headers. The issue is here: http://bugs.python.org/issue12147 At first I thought, sure, let's go ahead and fix the logic. But as I was fixing up the docs in that patch, it occurred to me that there is a problematic case: what if there is more than one set of Resent- headers? Detecting just the most recent set of headers is not, as far as I can tell, algorithmically possible, and indeed the RFC prohibits using them for automated processing. Heuristically we could be right probably 99% of the time. So, opinions: should I implement the heuristics, or should I refuse to guess and bail if from_addr and/or to_addrs is None and there are any Resent headers in the message? (Third alternative: continue to auto-detect it if there is only one set, as the current patch does.) In hindsight I should probably have not supported defaulting to picking up the values from the Message object, but absent the proposed email6 extended headers it really is a very handy convenience. -- R. David Murray http://www.bitdance.com _______________________________________________ Email-SIG mailing list Email-SIG@python.org Your options: http://mail.python.org/mailman/options/email-sig/archive%40mail-archive.com