[issue25736] smtplib can't send 8bit encoded utf-8 message

Ervin Hegedüs report at bugs.python.org
Thu Nov 26 12:54:14 EST 2015


Ervin Hegedüs added the comment:

David,

many thanks for your information.

I think my e-mail format was correct - I've copied it from a maildir, as an "email file".

As I wrote, there is a solution: before the code passes the 'msg' argument to sendmail() function, it needs to encode() it as "utf-8", then it will be a bytestream, instead of unicode (which is the default type of any string in Py3). Meanwhile I realized it :).

Thanks again, and sorry for my mistake.

----------

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


More information about the Python-bugs-list mailing list