Index: sitescripts/submit_email/web/submit_email.py |
=================================================================== |
--- a/sitescripts/submit_email/web/submit_email.py |
+++ b/sitescripts/submit_email/web/submit_email.py |
@@ -49,8 +49,14 @@ |
if lang: |
params.append(('lang', lang)) |
+ email_template = 'verification_email_template' |
+ product = data.get('product') |
Sebastian Noack
2015/08/19 10:10:08
What I meant is:
product = data.get('product',
Oleksandr
2015/08/19 13:56:42
Done.
|
+ if product is not None: |
+ 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' % ( |
@@ -80,6 +86,10 @@ |
) |
filename = config.get('submit_email', 'filename') |
+ product = params.get('product') |
Sebastian Noack
2015/08/19 10:10:08
Same here.
|
+ if product is not None: |
+ filename = config.get('submit_email', product + '_filename') |
+ |
with open(filename, 'ab', 0) as file: |
fcntl.lockf(file, fcntl.LOCK_EX) |
try: |