"smtplib.SMTPServerDisconnected: please run connect() first"

kj no.email at please.post
Fri Oct 9 18:38:46 EDT 2009



I'm getting the error:

    smtplib.SMTPServerDisconnected: please run connect() first

when I run code that is essentially identical to the code given in

    http://docs.python.org/library/email-examples.html

The error happens at the line (copied verbatim from the example
linked to above):

s.sendmail(me, [you], msg.as_string())

What am I doing wrong?

kynn

P.S. I'm running this using v. 2.6.1.

P.S.2. By "essentially identical" I mean that the only change I
made to the original snippet was to initialize variables that are
not initialized in the original (namely, textfile, me, and you)



More information about the Python-list mailing list