Bugs item #1430298, was opened at 2006-02-12 22:36 Message generated for change (Comment added) made by birkenfeld You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1430298&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.3 >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Freek Dijkstra (macfreek) Assigned to: Nobody/Anonymous (nobody) Summary: smtplib: empty mail addresses Initial Comment: It is not possible to send an email with smtplib with an empty return address. if you leave the sender mail address empty, smtplib will use "<None>" as sender, instead of "<>", as it should do. Note that an empty return address is typically used for mail delivery warnings (it has a valid usage!) This bug is still in current SVN (I just checked http://svn.python.org/ projects/python/trunk/Lib/smtplib.py). Below is a fix for smtplib.py that came with Python 2.3 (since I still use that version). The bug is in the function "quoteaddr(addr):" *** orig/smtplib.py 2005-05-14 23:48:03.000000000 +0200 --- smtplib.py 2006-02-08 09:52:25.000000000 +0100 *************** *** 176,181 **** --- 176,183 ---- if m == (None, None): # Indicates parse failure or AttributeError #something weird here.. punt -ddm return "<%s>" % addr + elif m == None: + return "<>" else: return "<%s>" % m ---------------------------------------------------------------------- >Comment By: Georg Brandl (birkenfeld) Date: 2006-02-17 10:53 Message: Logged In: YES user_id=1188172 Thanks for the report, I applied your patch in rev. 42442, 42443 (2.4). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1430298&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com