[issue12147] smtplib.send_message does not implement corectly rfc 2822

Nicolas Estibals report at bugs.python.org
Mon Jun 20 19:02:20 CEST 2011


Nicolas Estibals <nicolas.estibals at gmail.com> added the comment:

Hi,

Treating this as a bug is a good news, if we don't user of the function will ask for python 3.3

I also think the part concerning the Sender header is pretty clear and we can fix it easily.

About the Resent-* fields, I'm not sure of the right thing to do. But I haven't found the mention of no automatic processing for them but I found that RFC 2822 specify more exactly how to use them.

Contrary to the other fields, they have to be in block and the more recent block have to be at the beginning of the mail, moreover they must not be reordered during transfer. Thus I think we have to consider the first block of Resent-* fields if present. (cf. RFC 2822 third paragraph in section 3.6 and appendix A.3) However perhaps we have to wait for an answer from email-sig.

I have one more concern about the send_mesage method: if the Bcc field is present this one is deleted, thus we lose information if we copy it in a sent directory for instance. What do you think about the idea that send_message method should not modify the message ? (The sent message should get rid of the Bcc header but not the one the user keep after using the method.)

Best regards.

----------

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


More information about the Python-bugs-list mailing list