page: http://docs.python.org/library/email-examples.html In the first code sample: s = smtplib.SMTP() s.sendmail(me, [you], msg.as_string()) s.quit() s.connect() is required before s.sendmail()