Mercurial > p > roundup > code
diff roundup/mailer.py @ 3667:35811df7c783
fix error during mailgw bouncing message [SF#1413501]
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 11 Aug 2006 01:41:25 +0000 |
| parents | a052781093d7 |
| children | 6d14a3b4e295 |
line wrap: on
line diff
--- a/roundup/mailer.py Fri Aug 11 01:33:59 2006 +0000 +++ b/roundup/mailer.py Fri Aug 11 01:41:25 2006 +0000 @@ -1,7 +1,7 @@ """Sending Roundup-specific mail over SMTP. """ __docformat__ = 'restructuredtext' -# $Id: mailer.py,v 1.17 2006-02-21 05:48:23 a1s Exp $ +# $Id: mailer.py,v 1.18 2006-08-11 01:41:25 richard Exp $ import time, quopri, os, socket, smtplib, re, sys, traceback @@ -141,7 +141,14 @@ writer.lastpart() - self.smtp_send(to, message) + try: + self.smtp_send(to, message) + except MessageSendError: + # squash mail sending errors when bouncing mail + # TODO this *could* be better, as we could notify admin of the + # problem (even though the vast majority of bounce errors are + # because of spam) + pass def exception_message(self): '''Send a message to the admins with information about the latest
