[Python-checkins] r42442 - in python/trunk: Lib/smtplib.py Misc/NEWS

georg.brandl python-checkins at python.org
Fri Feb 17 10:52:54 CET 2006


Author: georg.brandl
Date: Fri Feb 17 10:52:53 2006
New Revision: 42442

Modified:
   python/trunk/Lib/smtplib.py
   python/trunk/Misc/NEWS
Log:
Bug #1430298: It is now possible to send a mail with an empty
return address using smtplib.


Modified: python/trunk/Lib/smtplib.py
==============================================================================
--- python/trunk/Lib/smtplib.py	(original)
+++ python/trunk/Lib/smtplib.py	Fri Feb 17 10:52:53 2006
@@ -175,8 +175,11 @@
     except AttributeError:
         pass
     if m == (None, None): # Indicates parse failure or AttributeError
-        #something weird here.. punt -ddm
+        # something weird here.. punt -ddm
         return "<%s>" % addr
+    elif m is None:
+        # the sender wants an empty return address
+        return "<>"
     else:
         return "<%s>" % m
 

Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Fri Feb 17 10:52:53 2006
@@ -363,6 +363,9 @@
 Library
 -------
 
+- Bug #1430298: It is now possible to send a mail with an empty
+  return address using smtplib.
+
 - Bug #1432260: The names of lambda functions are now properly displayed
   in pydoc.
 


More information about the Python-checkins mailing list