Code

better traversal error info
[roundup.git] / roundup / mailgw.py
index 80462780a91f6d88d6b231470d51bff2c5a08f05..50e3cbed5b80cee753f44e95c563798f1b0efc8a 100644 (file)
@@ -73,10 +73,9 @@ are calling the create() method to create a new node). If an auditor raises
 an exception, the original message is bounced back to the sender with the
 explanatory message given in the exception. 
 
-$Id: mailgw.py,v 1.83 2002-09-10 00:18:20 richard Exp $
+$Id: mailgw.py,v 1.85 2002-09-10 03:01:18 richard Exp $
 '''
 
-
 import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri
 import time, random
 import traceback, MimeWriter
@@ -240,8 +239,8 @@ class MailGW:
         msg = cStringIO.StringIO()
         writer = MimeWriter.MimeWriter(msg)
         writer.addheader('Subject', subject)
-        writer.addheader('From', '%s <%s>'% (self.instance.config.INSTANCE_NAME,
-            self.instance.config.ISSUE_TRACKER_EMAIL))
+        writer.addheader('From', '%s <%s>'% (self.instance.config.TRACKER_NAME,
+            self.instance.config.TRACKER_EMAIL))
         writer.addheader('To', ','.join(sendto))
         writer.addheader('MIME-Version', '1.0')
         part = writer.startmultipartbody('mixed')
@@ -319,7 +318,7 @@ class MailGW:
             classname = m.group('classname')
             if classname is None:
                 # no classname, fallback on the default
-                if hasattr(self.instance, 'MAIL_DEFAULT_CLASS') and \
+                if hasattr(self.instance.config, 'MAIL_DEFAULT_CLASS') and \
                         self.instance.config.MAIL_DEFAULT_CLASS:
                     classname = self.instance.config.MAIL_DEFAULT_CLASS
                 else:
@@ -562,7 +561,7 @@ Unknown address: %s
 
         # now update the recipients list
         recipients = []
-        tracker_email = self.instance.config.ISSUE_TRACKER_EMAIL.lower()
+        tracker_email = self.instance.config.TRACKER_EMAIL.lower()
         for recipient in message.getaddrlist('to') + message.getaddrlist('cc'):
             r = recipient[1].strip().lower()
             if r == tracker_email or not r: