Index: trunk/email2trac.py.in
===================================================================
--- trunk/email2trac.py.in	(revision 671)
+++ trunk/email2trac.py.in	(revision 672)
@@ -374,5 +374,6 @@
         #   e : email address that the user has set in the settings tab 
         #
-        users = [ (u,n,e) for (u, n, e) in self.env.get_known_users(self.db)
+        #users = [ (u,n,e) for (u, n, e) in self.env.get_known_users(self.db)
+        users = [ (u,n,e) for (u, n, e) in self.env.get_known_users()
             if ( 
                 (e and (e.lower() == self.email_addr.lower())) or
@@ -1005,8 +1006,5 @@
         ## When is the change committed
         # 
-        if self.VERSION < 0.11:
-            when = int(time.time())
-        else:
-            when = datetime.now(util.datefmt.utc)
+        when = datetime.now(util.datefmt.utc)
 
         try:
@@ -1030,5 +1028,6 @@
         ## How many changes has this ticket
         #
-        grouped = TicketModule(self.env).grouped_changelog_entries(tkt, self.db)
+        #grouped = TicketModule(self.env).grouped_changelog_entries(tkt, self.db)
+        grouped = TicketModule(self.env).grouped_changelog_entries(tkt)
         cnum = sum(1 for e in grouped) + 1
 
@@ -1037,22 +1036,9 @@
         #  We must use the ticket workflow framework
         #
-        if self.parameters.email_triggers_workflow and (self.VERSION >= 0.11):
-
+        if self.parameters.email_triggers_workflow:
             if not self.mail_workflow(tkt):
-
                 if tkt['status'] in ['closed']:
                     tkt['status'] = 'reopened'
                     tkt['resolution'] = ''
-
-        ## Old pre 0.11 situation
-        # 
-        elif self.parameters.email_triggers_workflow:
-
-            self.logger.debug('\temail triggers workflow pre trac 0.11')
-
-            if tkt['status'] in ['closed']:
-                tkt['status'] = 'reopened'
-                tkt['resolution'] = ''
-
         else:
             self.logger.debug('\temail triggers workflow disabled')
@@ -1305,8 +1291,5 @@
         ## When is the change committed
         # 
-        if self.VERSION < 0.11:
-            when = int(time.time())
-        else:
-            when = datetime.now(util.datefmt.utc)
+        when = datetime.now(util.datefmt.utc)
 
         if self.parameters.dry_run:
@@ -1345,5 +1328,5 @@
             comment = '%s\n%s\n' %(comment, error_with_attachments)
 
-        if self.parameters.email_triggers_workflow and (self.VERSION >= 0.11):
+        if self.parameters.email_triggers_workflow:
             if self.mail_workflow(tkt):
                 changed = True
@@ -1778,8 +1761,5 @@
             self.save_email_for_debug(m, self.parameters.project_name, True)
 
-        if self.VERSION <= 0.11: 
-            self.db = self.env.get_db_cnx()
-        else:
-            self.db = self.env.get_read_db()
+        self.db = self.env.get_read_db()
 
         self.get_sender_info(m)
@@ -2458,8 +2438,5 @@
                )
 
-        if self.VERSION in [ 0.10 ]:
-            s = '\r\n{{{\r\n#!html\r\n<a\r\n href="mailto:%s">Reply to: %s\r\n</a>\r\n}}}\r\n' %(s, author)
-        else:
-            s = '[mailto:"%s" Reply to: %s]' %(s, author)
+        s = '[mailto:"%s" Reply to: %s]' %(s, author)
 
         self.logger.debug("\tmailto link %s" %s)
@@ -2513,11 +2490,4 @@
         try:
 
-
-            ## create false {abs_}href properties, to trick Notify()
-            #
-            if self.VERSION in [0.10]:
-                self.env.abs_href = Href(self.get_config('project', 'url'))
-                self.env.href = Href(self.get_config('project', 'url'))
-
             tn = Email2TracNotifyEmail(self.env)
 
@@ -2552,5 +2522,5 @@
             if self.parameters.alternate_notify_template:
 
-                if self.VERSION >= 0.11:
+                if self.VERSION >= 0.12:
 
                     from trac.web.chrome import Chrome
@@ -2814,21 +2784,6 @@
     
     try:
-        if version == '0.10':
-            from trac import attachment 
-            from trac.env import Environment
-            from trac.ticket import Ticket
-            from trac.web.href import Href
-            from trac import util
-            from trac.ticket.web_ui import TicketModule
-
-            #
-            # return  util.text.to_unicode(str)
-            #
-            # see http://projects.edgewall.com/trac/changeset/2799
-            from trac.ticket.notification import TicketNotifyEmail
-            from trac import config as trac_config
-            from trac.core import TracError
-
-        elif version in ['0.11', '0.12', '0.13', '1.0', '1.1']:
+
+        if version in ['0.12', '0.13', '1.0', '1.1']:
             from trac import attachment 
             from trac import config as trac_config
