Commit f6c59e8f authored by Fred Drake's avatar Fred Drake

Do all the right imports. Problem reported by Martijn Faassen

<faassen@vet.uu.nl>.
parent 67a40e81
......@@ -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()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment