[Zope-dev] [Checkins] SVN: zope.sendmail/trunk/src/zope/sendmail/mailer.py gmail seems to burp nowadays on smtp quit, deep down in smtplib
Zvezdan Petkovic
zvezdan at zope.com
Tue Oct 7 10:59:40 EDT 2008
On Oct 5, 2008, at 1:57 AM, Adam Groszer wrote:
> Log message for revision 91759:
> gmail seems to burp nowadays on smtp quit, deep down in smtplib
> mail should be safely sent at this point
"... deep down ... should be ..."
These words do not sound very encouraging.
> connection.sendmail(fromaddr, toaddrs, message)
> - connection.quit()
> + try:
> + connection.quit()
> + except:
> + pass
The purpose of quit() is unrelated to whether the mail was or was not
sent. The purpose is to gracefully send a QUIT to SMTP server and
then _close_ the socket.
Are we absolutely sure that the socket gets closed here and that we
are not leaking sockets (i.e., file handles) here?
If we are not, we should not pass on the exception.
Moreover, we should not pass on _every_ exception.
More information about the Zope-Dev
mailing list