Changeset 508 for trunk/email2trac.py.in
- Timestamp:
- 01/11/11 16:43:48 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/email2trac.py.in
r507 r508 84 84 from trac import config as trac_config 85 85 86 # Some global variables86 ## Some global variables 87 87 # 88 88 m = None 89 90 # This is to for the function AlwaysNotifyReporter 91 sender_email = None 89 92 90 93 class SaraDict(UserDict.UserDict): … … 2108 2111 self.logger.debug('function notify()') 2109 2112 2110 if self.parameters.dry_run: 2113 if self.parameters.always_notify_reporter: 2114 global sender_email 2115 sender_email = self.email_addr 2116 2117 self.logger.debug('\t Using Email2TracNotification function AlwaysNotifyReporter') 2118 import trac.notification as Email2TracNotification 2119 Email2TracNotification.Notify.notify = AlwaysNotifyReporter 2120 2121 if self.parameters.dry_run : 2111 2122 print 'DRY_RUN: self.notify(tkt, True) reporter = %s' %tkt['reporter'] 2112 2123 return … … 2129 2140 self.env.href = Href(self.get_config('project', 'url')) 2130 2141 2131 2132 2142 tn = TicketNotifyEmail(self.env) 2133 2143 … … 2154 2164 self.logger.error('Failure sending notification on creation of ticket #%s: %s' %(self.id, e)) 2155 2165 2156 2166 ########## END Class Definition ######################################################## 2167 2168 ########## Global Notificaition Function ################################################ 2169 def AlwaysNotifyReporter(self, resid): 2170 """ 2171 Copy of def notify() to manipulate recipents to always include reporter for the 2172 notification. 2173 """ 2174 (torcpts, ccrcpts) = self.get_recipients(resid) 2175 2176 if not tktparser.email_header_acl('notify_reporter_black_list', sender_email, False): 2177 ## additionally append sender (regardeless of settings in trac.ini) 2178 # 2179 if not sender_email in torcpts: 2180 torcpts.append(sender_email) 2181 2182 self.begin_send() 2183 self.send(torcpts, ccrcpts) 2184 self.finish_send() 2157 2185 2158 2186 ########## Parse Config File ###########################################################
Note: See TracChangeset
for help on using the changeset viewer.