smtplib and TLS

Matthias Kluwe mkluwe at
Sat Jun 18 09:32:58 CEST 2005

> "Matthias Kluwe" <mkl... at> writes:
>> The server accepts and delivers my messages, but the last command
>> raises

>> socket.sslerror: (8, 'EOF occurred in violation of protocol')

>> Did I miss something? Any hint is welcome.

> Looks like the module didn't send an TLS Close Notify message before
> closing the socket.  I don't see anything in the docs about how to
> send one from smtplib or socket, though.

Hmm. I tried


before server.quit() with the result of

SMTPServerDisconnected('Server not connected')

being raised. Quite an improvement ...


More information about the Python-list mailing list