Do all the right imports. Problem reported by Martijn Faassen

<faassen@vet.uu.nl>.
This commit is contained in:
Fred Drake 1998-11-30 15:07:26 +00:00
parent 67a40e814c
commit f6c59e8fff
1 changed files with 2 additions and 1 deletions

View File

@ -138,6 +138,7 @@ consult the module code.
\begin{verbatim}
import rfc822, string, sys
import smtplib
def prompt(prompt):
sys.stdout.write(prompt + ": ")
@ -154,7 +155,7 @@ while 1:
msg = msg + line
print "Message length is " + `len(msg)`
server = SMTP('localhost')
server = smtplib.SMTP('localhost')
server.set_debuglevel(1)
server.sendmail(fromaddr, toaddrs, msg)
server.quit()