Index: sitescripts/submit_email/web/submit_email.py |
=================================================================== |
--- a/sitescripts/submit_email/web/submit_email.py |
+++ b/sitescripts/submit_email/web/submit_email.py |
@@ -26,6 +26,7 @@ |
from sitescripts.web import url_handler, form_handler, send_simple_response |
VERIFICATION_PATH = '/verifyEmail' |
+ADBLOCKBROWSER_PRODUCT_NAME = 'adblockbrowser' |
def sign(config, data): |
secret = config.get('submit_email', 'secret') |
@@ -49,8 +50,12 @@ |
if lang: |
params.append(('lang', lang)) |
+ product = data.get('product', ADBLOCKBROWSER_PRODUCT_NAME) |
+ email_template = product + '_verification_email_template' |
+ params.append(('product', product)) |
+ |
sendMail( |
- config.get('submit_email', 'verification_email_template'), |
+ config.get('submit_email', email_template), |
{ |
'recipient': email, |
'verification_url': '%s?%s' % ( |
@@ -79,7 +84,9 @@ |
'Invalid signature in verification request.' |
) |
- filename = config.get('submit_email', 'filename') |
+ product = params.get('product', ADBLOCKBROWSER_PRODUCT_NAME) |
+ filename = config.get('submit_email', product + '_filename') |
+ |
with open(filename, 'ab', 0) as file: |
fcntl.lockf(file, fcntl.LOCK_EX) |
try: |