R. David Murray added the comment: RFC 2812 says:
Note that the first <CRLF> of this terminating sequence is also the <CRLF> that ends the final line of the data (message text) So, smtplib is correct. If you have a server that is not respecting this, then that server is out of compliance and there isn't anything we can do about it. However, I don't think that is your problem. = at the end of a line actually represents a "soft carriage return", which means one that is *eliminated* in the decoded output. If you will read section 6.7 of rfc 2045, specifically notes (2) and (3) in the second block of numbered paragraphs, you will see that an 'ultimate' = (an = at the end of an encoded block, with or without a CRLF after it), such as you have in your sample, is illegal. Further, the recommended recovery action if one is seen while decoding is to leave the = in the decoded output, just as you are observing happening. So, there is no bug here except in your message :) ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25553> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com