smtplib startls() + quit()

Greg Donald gdonald at gmail.com
Thu Mar 29 18:01:14 EDT 2007


When using starttls(), calling quit() throws an exception:

-> server.quit()
(Pdb) n
send: 'quit\r\n'
sslerror: (8, 'EOF occurred in violation of protocol')

For the moment I and catching it like so:

            try:
                # this throws an exception when using tls
                server.quit()
            except:
                pass

Is there some other way to tear down the connection besides calling quit() ?


Thanks,


-- 
Greg Donald
http://destiney.com/



More information about the Python-list mailing list