From 348fd06890a964e713e151526b0de5042c68574e Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 14 Jan 1999 04:18:46 +0000 Subject: 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. --- Lib/smtplib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Lib/smtplib.py') diff --git a/Lib/smtplib.py b/Lib/smtplib.py index 264eafb157..ebaf7f216f 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): -- cgit v1.2.1