[New-bugs-announce] [issue4470] smtplib SMTP_SSL not working.

Lorenzo M. Catucci report at bugs.python.org
Sun Nov 30 17:23:34 CET 2008


New submission from Lorenzo M. Catucci <lorenzo at sancho.ccd.uniroma2.it>:

The enclosed patch does three things:
1. enables SMTP_SSL working: the _get_socket method was setting
   self.sock instead of returning the socket to the caller, which
   did reset self.sock to None
2. replace home-grown SSLFakeFile() with calls to ssl.socket's makefile()
   calls both in the starttls and in the SMTP_SSL cases
3. shutdown sockets before closing them, to avoid server-side piling and
   connection refused on connection-limited servers
The last change is just a cosmetical refactoring, but it really helps
the SMTP_SSL case: default_port should really be a class attribute,
instead of being set at __init__ time.

----------
components: Library (Lib)
files: smtplib.py.patch
keywords: patch
messages: 76640
nosy: lcatucci
severity: normal
status: open
title: smtplib SMTP_SSL not working.
versions: Python 2.6
Added file: http://bugs.python.org/file12168/smtplib.py.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4470>
_______________________________________


More information about the New-bugs-announce mailing list