diff roundup/mailgw.py @ 3948:81531a2aed59

Admin copy of error email from mailgw includes traceback
author Richard Jones <richard@users.sourceforge.net>
date Mon, 19 Nov 2007 20:45:57 +0000
parents 1dd64778bc45
children 22339538cf10
line wrap: on
line diff
--- a/roundup/mailgw.py	Thu Nov 15 07:18:21 2007 +0000
+++ b/roundup/mailgw.py	Mon Nov 19 20:45:57 2007 +0000
@@ -73,7 +73,7 @@
 an exception, the original message is bounced back to the sender with the
 explanatory message given in the exception.
 
-$Id: mailgw.py,v 1.193 2007-11-14 14:57:47 schlatterbeck Exp $
+$Id: mailgw.py,v 1.194 2007-11-19 20:45:57 richard Exp $
 """
 __docformat__ = 'restructuredtext'
 
@@ -764,12 +764,15 @@
 
             # bounce the message back to the sender with the error message
             # let the admin know that something very bad is happening
-            sendto = [sendto[0][1], self.instance.config.ADMIN_EMAIL]
             m = ['']
             m.append('An unexpected error occurred during the processing')
             m.append('of your message. The tracker administrator is being')
             m.append('notified.\n')
-            self.mailer.bounce_message(message, sendto, m)
+            self.mailer.bounce_message(message, sendto[0][1], m)
+
+            m.append('----------------')
+            m.append(traceback.format_exc())
+            self.mailer.bounce_message(message, [self.instance.config.ADMIN_EMAIL], m)
 
     def handle_message(self, message):
         ''' message - a Message instance

Roundup Issue Tracker: http://roundup-tracker.org/