Private
Public Access
1
0

comment notifications

This commit is contained in:
Sander Roosendaal
2017-02-23 12:13:55 +01:00
parent edf9709fa2
commit 27acec196a
6 changed files with 101 additions and 9 deletions

View File

@@ -273,6 +273,37 @@ def handle_sendemail_invite(email,name,code,teamname,manager):
return 1
@app.task
def handle_sendemailnewresponse(first_name,last_name,
email,
commenter_first_name,
commenter_last_name,
comment,
workoutname,workoutid,commentid):
fullemail = first_name+' '+last_name+' <'+email+'>'
subject = 'New comment on workout '+workoutname
message = 'Dear '+first_name+',\n\n'
message += commenter_first_name+' '+commenter_last_name
message += ' has written a new comment on the workout '
message += workoutname+'\n\n'
message += comment
message += '\n\n'
message += 'You can read the comment here:\n'
message += 'https://rowsandall.com/rowers/workout/'+str(workoutid)+'/comment'
message += '\n\n'
message += 'You are receiving this email because you are subscribed '
message += 'to comments on this workout. To unsubscribe, follow this link:\n'
message += 'https://rowsandall.com/rowers/workout/unsubscribe/'+str(workoutid)+'/'
email = EmailMessage(subject, message,
'Rowsandall <info@rowsandall.com>',
[fullemail])
res = email.send()
return 1
@app.task
def handle_sendemailnewcomment(first_name,
last_name,