summaryrefslogtreecommitdiff
path: root/Lib/smtplib.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-02-17 09:52:53 +0000
committerGeorg Brandl <georg@python.org>2006-02-17 09:52:53 +0000
commit2d15b62e9fd6ea5c391c53d13da4b4b5a5dd9cf9 (patch)
tree0b89eb0eceafb678ad53f4e1b4cf84db24e3e40e /Lib/smtplib.py
parent9d84f028871020b6f9b6f858ddeb90a8c83fd08b (diff)
downloadcpython-2d15b62e9fd6ea5c391c53d13da4b4b5a5dd9cf9.tar.gz
Bug #1430298: It is now possible to send a mail with an empty
return address using smtplib.
Diffstat (limited to 'Lib/smtplib.py')
-rwxr-xr-xLib/smtplib.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/smtplib.py b/Lib/smtplib.py
index 57605a96da..71d25fda26 100755
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
@@ -175,8 +175,11 @@ def quoteaddr(addr):
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