In rcpt(), avoid a space after the TO: address when the option list is
authorGuido van Rossum <guido@python.org>
Thu, 14 Jan 1999 04:18:46 +0000 (04:18 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 14 Jan 1999 04:18:46 +0000 (04:18 +0000)
empty.  Make sure there is a space when there are options.

Lib/smtplib.py

index 264eafb157045d1d79c78c7d81d82d368902ff6b..ebaf7f216f5d754b9f6f049d48241b0e974977de 100755 (executable)
@@ -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):