diff roundup/mailgw.py @ 3469:d3b02352484f

enable registration confirmation by web only [SF#1381675]
author Richard Jones <richard@users.sourceforge.net>
date Fri, 13 Jan 2006 03:56:36 +0000
parents 07c696890f55
children db856d488de0
line wrap: on
line diff
--- a/roundup/mailgw.py	Fri Jan 13 03:50:03 2006 +0000
+++ b/roundup/mailgw.py	Fri Jan 13 03:56:36 2006 +0000
@@ -72,7 +72,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.168 2005-10-07 04:42:13 richard Exp $
+$Id: mailgw.py,v 1.169 2006-01-13 03:56:36 richard Exp $
 """
 __docformat__ = 'restructuredtext'
 
@@ -605,15 +605,16 @@
 
         # check for registration OTK
         # or fallback on the default class
-        otk_re = re.compile('-- key (?P<otk>[a-zA-Z0-9]{32})')
-        otk = otk_re.search(subject)
-        if otk:
-            self.db.confirm_registration(otk.group('otk'))
-            subject = 'Your registration to %s is complete' % \
-                      config['TRACKER_NAME']
-            sendto = [from_list[0][1]]
-            self.mailer.standard_message(sendto, subject, '')
-            return
+        if self.db.config['EMAIL_REGISTRATION_CONFIRMATION']:
+            otk_re = re.compile('-- key (?P<otk>[a-zA-Z0-9]{32})')
+            otk = otk_re.search(m.group('title'))
+            if otk:
+                self.db.confirm_registration(otk.group('otk'))
+                subject = 'Your registration to %s is complete' % \
+                          config['TRACKER_NAME']
+                sendto = [from_list[0][1]]
+                self.mailer.standard_message(sendto, subject, '')
+                return
 
         # XXX Don't enable. This doesn't work yet.
 #  "[^A-z.]tracker\+(?P<classname>[^\d\s]+)(?P<nodeid>\d+)\@some.dom.ain[^A-z.]"

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