From: Guido van Rossum Date: Thu, 14 Jan 1999 04:18:46 +0000 (+0000) Subject: In rcpt(), avoid a space after the TO: address when the option list is X-Git-Tag: v1.5.2b2~355 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=348fd06890a964e713e151526b0de5042c68574e;p=thirdparty%2FPython%2Fcpython.git 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. --- diff --git a/Lib/smtplib.py b/Lib/smtplib.py index 264eafb15704..ebaf7f216f5d 100755 --- a/Lib/smtplib.py +++ b/Lib/smtplib.py @@ -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):