Comment 4 for bug 76239

Revision history for this message
James Henstridge (jamesh) wrote :

My guess is that the problem code is:

    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.