try:
# The world can always use a little bit more encryption :) smtp.starttls()
except smtplib.SMTPException:
pass
Looking at the code in smtp.starttls(), normal server errors should be indicated in the return value. By the look of it, the only SMTPException that can get raised is SMTPServerDisconnected, which we certainly don't want to ignore.
Matthew: could you try changing the "pass" bit to "raise" in the above code, and see if this hypothesis is correct? If it is correct, then you should get an SMTPServerDisconnected traceback instead of the "please run connect() first" error message.
My guess is that the problem code is:
try:
smtp.starttls( ) SMTPException:
# The world can always use a little bit more encryption :)
except smtplib.
pass
Looking at the code in smtp.starttls(), normal server errors should be indicated in the return value. By the look of it, the only SMTPException that can get raised is SMTPServerDisco nnected, which we certainly don't want to ignore.
Matthew: could you try changing the "pass" bit to "raise" in the above code, and see if this hypothesis is correct? If it is correct, then you should get an SMTPServerDisco nnected traceback instead of the "please run connect() first" error message.