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

2010-11-05 Thread R. David Murray
Changes by R. David Murray : -- Removed message: http://bugs.python.org/msg120476 ___ Python tracker ___ ___ Python-bugs-list mailing l

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

2010-11-05 Thread R. David Murray
R. David Murray 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

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

2010-11-05 Thread R. David Murray
R. David Murray 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 8050 where I've attached a patch that adds support for sending binary data as a by-product of adding support for Message objects. >From M

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

2009-04-25 Thread Daniel Diniz
Daniel Diniz added the comment: We might want to add the workaround to docs or even to extend smtplib to support it. -- nosy: +ajaksu2 priority: -> normal stage: -> test needed type: -> behavior versions: +Python 3.1 ___ Python tracker

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

2008-11-25 Thread August Mueller
August Mueller <[EMAIL PROTECTED]> added the comment: For completeness, if anyone runs across this in the future, the following seems to work for sending utf-8 mail in python 3: import smtplib import email.mime.text msg = email.mime.text.MIMEText("Ümlaut", _charset="UTF-8") smtp = smtplib.SM

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

2008-11-23 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: I see. It seems Python 3.0 just won't support that usage, then. You still should be able to use MIME to send non-ASCII characters. ___ Python tracker <[EMAIL PROTECTED]>

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

2008-11-23 Thread August Mueller
August Mueller <[EMAIL PROTECTED]> added the comment: Encoding the message first doesn't work either: >>> import smtplib >>> server = smtplib.SMTP("localhost") >>> server.sendmail("[EMAIL PROTECTED]", "[EMAIL PROTECTED]", >>> "Ümlaut".encode("UTF-8")) Traceback (most recent call last): File "

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

2008-11-23 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: > Is there a good reason for this? Most definitely. In Python 2.x, the string literal denotes a byte string, whereas in 3.x, it is a character string. It's not possible to send a character string directly over the network; try encoding it.

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

2008-11-23 Thread August Mueller
New submission from August Mueller <[EMAIL PROTECTED]>: smtplib requires that messages being sent be in ascii, and throws an exception otherwise. Python 2.6 doesn't require this. Here's the diff where it was introduced: http://svn.python.org/view/python/branches/py3k/Lib/smtplib.py?rev=59102&