Changeset 74
- Timestamp:
- 05/22/06 15:23:24 (17 years ago)
- Location:
- emailtotracscript/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
emailtotracscript/trunk/INSTALL
r56 r74 18 18 umask: 022 # OPTIONAL, Use this umask for saving attachments 19 19 mailto_link: 1 # OPTIONAL, if set then [mailto:<CC>] in description 20 mailto_cc: basv@sara.nl # OPTIONAL, Use ths address as CC in mailto line 21 ticket_update: 1 # OPTIONAL, if set then check if this is an update for a ticket 20 22 email_header: 1 # OPTIONAL, if set then show TO/CC fields in description 21 23 trac_version: 0.8 # OPTIONAL, if set use this as trac version (D: 0.9) -
emailtotracscript/trunk/email2trac.py.in
r73 r74 47 47 ---------- 48 48 * Create an config file: 49 [DEFAULT] # REQUIRED 50 project : /data/trac/test # REQUIRED 51 debug : 1 # OPTIONAL, if set print some DEBUG info 52 spam_level : 4 # OPTIONAL, if set check for SPAM mail 53 reply_address: 1 # OPTIONAL, if set then fill in ticket CC field 54 umask : 022 # OPTIONAL, if set then use this umask for creation of the attachments 55 mailto_link : 1 # OPTIONAL, if set then [mailto:<CC>] in description 56 trac_version : 0.8 # OPTIONAL, default is 0.9 49 [DEFAULT] # REQUIRED 50 project : /data/trac/test # REQUIRED 51 debug : 1 # OPTIONAL, if set print some DEBUG info 52 spam_level : 4 # OPTIONAL, if set check for SPAM mail 53 reply_address: 1 # OPTIONAL, if set then fill in ticket CC field 54 umask : 022 # OPTIONAL, if set then use this umask for creation of the attachments 55 mailto_link : 1 # OPTIONAL, if set then [mailto:<>] in description 56 mailto_cc : basv@sara.nl # OPTIONAL, Use this address as CC in mailto line 57 ticket_update: 1 # OPTIONAL, if set then check if this is an update for a ticket 58 trac_version : 0.8 # OPTIONAL, default is 0.9 57 59 58 60 [jouvin] # OPTIONAL project declaration, if set both fields necessary … … 82 84 import unicodedata 83 85 import ConfigParser 86 import sqlite 84 87 from email import Header 85 88 from stat import * … … 121 124 if parameters.has_key('mailto_link'): 122 125 self.MAILTO = int(parameters['mailto_link']) 126 if parameters.has_key('mailto_cc'): 127 self.MAILTO_CC = parameters['mailto_cc'] 128 else: 129 self.MAILTO_CC = '' 123 130 else: 124 131 self.MAILTO = 0 … … 146 153 else: 147 154 self.REPLY_ALL = 0 155 156 if parameters.has_key('ticket_update'): 157 self.TICKET_UPDATE = int(parameters['ticket_update']) 158 else: 159 self.TICKET_UPDATE = 0 148 160 149 161 … … 355 367 self.notification = 0 356 368 357 # Is this a previous ticket 358 # 359 if self.ticket_update(msg): 360 return True 369 # Must we update existing tickets 370 # 371 if self.TICKET_UPDATE > 0: 372 if self.ticket_update(msg): 373 return True 361 374 362 375 tkt = Ticket(self.env) … … 498 511 499 512 # Temporary fix 500 str = 'mailto:%s?subject=%s' %(urllib.quote(self.email_addr), urllib.quote('Re: #%s: %s' %(id, subject))) 513 str = 'mailto:%s?Subject=%s&Cc=%s' %( 514 urllib.quote(self.email_addr), 515 urllib.quote('Re: #%s: %s' %(id, subject)), 516 urllib.quote(self.MAILTO_CC) 517 ) 518 501 519 str = '\n{{{\n#!html\n<a href="%s">Reply to: %s</a>\n}}}\n' %(str, author) 502 520 … … 682 700 from trac.Href import Href 683 701 from trac import util 684 import sqlite685 702 elif version == 0.9: 686 703 from trac import attachment
Note: See TracChangeset
for help on using the changeset viewer.