In rcpt(), avoid a space after the TO: address when the option list is

empty.  Make sure there is a space when there are options.
This commit is contained in:
Guido van Rossum 1999-01-14 04:18:46 +00:00
parent e1bf7e8c1d
commit 348fd06890

View file

@ -294,8 +294,8 @@ class SMTP:
"""SMTP 'rcpt' command -- indicates 1 recipient for this mail."""
optionlist = ''
if options and self.does_esmtp:
optionlist = string.join(options, ' ')
self.putcmd("rcpt","TO:%s %s" % (quoteaddr(recip),optionlist))
optionlist = ' ' + string.join(options, ' ')
self.putcmd("rcpt","TO:%s%s" % (quoteaddr(recip),optionlist))
return self.getreply()
def data(self,msg):