Commit 348fd068 authored by Guido van Rossum's avatar Guido van Rossum

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.
parent e1bf7e8c
...@@ -294,8 +294,8 @@ class SMTP: ...@@ -294,8 +294,8 @@ class SMTP:
"""SMTP 'rcpt' command -- indicates 1 recipient for this mail.""" """SMTP 'rcpt' command -- indicates 1 recipient for this mail."""
optionlist = '' optionlist = ''
if options and self.does_esmtp: if options and self.does_esmtp:
optionlist = string.join(options, ' ') optionlist = ' ' + string.join(options, ' ')
self.putcmd("rcpt","TO:%s %s" % (quoteaddr(recip),optionlist)) self.putcmd("rcpt","TO:%s%s" % (quoteaddr(recip),optionlist))
return self.getreply() return self.getreply()
def data(self,msg): def data(self,msg):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment