[issue4403] regression from 2.6: smtplib.py requiring ascii for sending messages

R. David Murray report at bugs.python.org
Fri Nov 5 10:12:20 CET 2010


R. David Murray <rdmurray at bitdance.com> added the comment:

I'm closing this issue as invalid, since as Martin pointed out you can't send unicode over the wire.

However, see issue 10321 where I've attached a patch that adds support for sending binary data as a by-product of adding support for Message objects.

>From Martin's msg76301 I gather he initially expected sendmail to take only binary data, which would it seems to me probably be the better API.  However at this point we are stuck with supporting ASCII-only strings in the API as well.

As a further note, however, the original example in this issue would have produced a non-RFC-conformant message when used in python 2.x.  You can't just send 8bit data willy-nilly, there are rules that should be followed.  Which is why the issue 10321 patch adds support for using Message objects, since the email package knows what those rules are...

----------

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


More information about the Python-bugs-list mailing list