Bug #1430298: It is now possible to send a mail with an empty

return address using smtplib.
This commit is contained in:
Georg Brandl 2006-02-17 09:52:53 +00:00
parent 0e1abe2a07
commit bd3bc4dc4c
2 changed files with 7 additions and 1 deletions

View file

@ -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