Re: [Zope-dev] [Checkins] SVN: zope.sendmail/trunk/src/zope/sendmail/mailer.py try again with catching sslerror, thx Jens
On Oct 5, 2008, at 4:51 AM, Adam Groszer wrote:
connection.sendmail(fromaddr, toaddrs, message) try: connection.quit() - except: + except socket.sslerror: + #something weird happened while quiting pass
This is better because it catches a _specific_ exception. However, are we _certain_ that the socket is closed after this? If not, I think we should close it explicitly instead of passing on it. Thoughts, comments, anybody?
On Tue, Oct 7, 2008 at 11:00 AM, Zvezdan Petkovic <zvezdan@zope.com> wrote:
However, are we _certain_ that the socket is closed after this?
smtplib does *not* close the client socket if there's an exception while sending the quit message or processing the response. It could be best if connection..close() were called in the case of an exception. -Fred -- Fred L. Drake, Jr. <fdrake at gmail.com> "Chaos is the score upon which reality is written." --Henry Miller
participants (2)
-
Fred Drake -
Zvezdan Petkovic