>From the "Closing Old Issues" department: SVN-1804: "mailer.py doesn't catch SMTPRecipientsRefused in finish()" * Created and last updated in 2004. * No comments in more than 15 years.
>From my reading of this issue, the impact is that any mail delivery hiccup may cause this hook script to exit with an unhandled exception, impeding any further mails that it might have sent. Looking at mailer.py in trunk@HEAD, SMTPOutput.finish() doesn't handle any exceptions. In particular: SMTP.login may raise: * SMTPHeloError * SMTPAuthenticationError * SMTPNotSupportedError * SMTPException SMTP.sendmail may raise: * SMTPRecipientsRefused * SMTPHeloError * SMTPSenderRefused * SMTPDataError * SMTPNotSupportedError Any of these exceptions cause the same impact. The same is probably true of any unhandled exceptions throughout the script, but SMTP errors are completely outside our control. So we have a choice to make: Either: Option 1: Handle (and ignore) exceptions in SMTPOutput.finish() to let script execution continue after any SMTP failure. This could be as simple as wrapping the contents of SMTPOutput.finish() in a "try:" .. "except:" (catch-all), where the except block does nothing. Option 2: Just close the issue. No comments on this issue in 15 years. Thoughts?