sending alerts in rudimentary form
This commit is contained in:
@@ -756,6 +756,35 @@ def handle_updatedps(useremail, workoutids, debug=False,**kwargs):
|
||||
|
||||
return 1
|
||||
|
||||
@app.task
|
||||
def handle_send_email_alert(
|
||||
useremail, userfirstname, userlastname, stats, **kwargs):
|
||||
|
||||
if 'debug' in kwargs:
|
||||
debug = kwargs['debug']
|
||||
else:
|
||||
debug = False
|
||||
|
||||
subject = "Your rowing performance on rowsandall.com ({startdate} to {enddate})".format(
|
||||
startdate = stats['startdate'],
|
||||
enddate = stats['enddate'],
|
||||
)
|
||||
|
||||
from_email = 'Rowsandall <info@rowsandall.com>'
|
||||
|
||||
d = {
|
||||
'report':stats,
|
||||
'first_name':userfirstname,
|
||||
'last_name':userlastname,
|
||||
'siteurl':siteurl,
|
||||
}
|
||||
|
||||
res = send_template_email(from_email,[useremail],subject,
|
||||
'alertemail.html',
|
||||
d,**kwargs)
|
||||
|
||||
return 1
|
||||
|
||||
@app.task
|
||||
def handle_send_email_transaction(
|
||||
username, useremail, amount, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user