Issue 1307 by Derek Shockey, fox the same bug for RCPT.
Neal: please backport!
diff --git a/Lib/smtpd.py b/Lib/smtpd.py
index 4aa3476..e09774f 100755
--- a/Lib/smtpd.py
+++ b/Lib/smtpd.py
@@ -237,7 +237,7 @@
         if not self.__mailfrom:
             self.push('503 Error: need MAIL command')
             return
-        address = self.__getaddr('TO:', arg)
+        address = self.__getaddr('TO:', arg) if arg else None
         if not address:
             self.push('501 Syntax: RCPT TO: <address>')
             return