[Python-bugs-list] [ python-Bugs-521270 ] SMTP does not handle UNICODE
noreply@sourceforge.net
noreply@sourceforge.net
Sat, 23 Feb 2002 15:11:39 -0800
Bugs item #521270, was opened at 2002-02-21 17:36
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=521270&group_id=5470
Category: Python Library
Group: Python 2.1.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Noah Spurrier (noah)
Assigned to: Nobody/Anonymous (nobody)
Summary: SMTP does not handle UNICODE
Initial Comment:
The SMTP library does not gracefully handle
<type 'unicode'> strings. This type of string
is frequently returned from a databases and
particulary when working with COM objects.
For example, we pull email TO addresses and messages
from from a database. We would like to call:
server.sendmail(FROM, TO, message)
instead we have to do this:
server.sendmail(FROM, str(TO), str(message))
>From a users point of view it is easy to get
around this by putting str() around every string
before calling STMP methods, but I think it would
make more sense for SMTP to convert them or
gracefully handle them.
----------------------------------------------------------------------
>Comment By: Martin v. Löwis (loewis)
Date: 2002-02-23 15:11
Message:
Logged In: YES
user_id=21627
Can you give a specific example? Please attach a script to
this report which exposes the error you are seeing (using
Unicode literals where necessary).
Perhaps you have non-ASCII characters in your strings? Those
are not supported by the SMTP protocol, so there is no way
smtplib could handle them gracefully.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=521270&group_id=5470