homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author macfreek
Recipients
Date 2006年02月12日.21:36:24
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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
 
History
Date User Action Args
2007年08月23日 14:37:47adminlinkissue1430298 messages
2007年08月23日 14:37:47admincreate

AltStyle によって変換されたページ (->オリジナル) /