notification emails
for rejected and accepted coaching offers and requests
This commit is contained in:
@@ -1725,6 +1725,98 @@ def handle_sendemail_coachrequest(email,name,code,coachname,
|
||||
|
||||
return 1
|
||||
|
||||
@app.task
|
||||
def handle_sendemail_coachoffer_rejected(coachemail,coachname,name,
|
||||
debug=False,**kwargs):
|
||||
|
||||
fullemail = coachemail
|
||||
subject = '{n} has rejected your offer to be his coach on rowsandall.com'.format(n=name)
|
||||
from_email = 'Rowsandall <info@rowsandall.com>'
|
||||
siteurl = SITE_URL
|
||||
if debug:
|
||||
siteurl = SITE_URL_DEV
|
||||
|
||||
d = {
|
||||
'name':name,
|
||||
'coach':coachname,
|
||||
'siteurl':siteurl,
|
||||
}
|
||||
|
||||
res = send_template_email(from_email,[fullemail],
|
||||
subject,'coachofferrejectedemail.html',
|
||||
d,
|
||||
**kwargs)
|
||||
return 1
|
||||
|
||||
@app.task
|
||||
def handle_sendemail_coachrequest_rejected(email,coachname,name,
|
||||
debug=False,**kwargs):
|
||||
|
||||
fullemail = email
|
||||
subject = '{n} has rejected your coaching request on rowsandall.com'.format(n=coachname)
|
||||
from_email = 'Rowsandall <info@rowsandall.com>'
|
||||
siteurl = SITE_URL
|
||||
if debug:
|
||||
siteurl = SITE_URL_DEV
|
||||
|
||||
d = {
|
||||
'name':name,
|
||||
'coach':coachname,
|
||||
'siteurl':siteurl,
|
||||
}
|
||||
|
||||
res = send_template_email(from_email,[fullemail],
|
||||
subject,'coachrequestrejectedemail.html',
|
||||
d,
|
||||
**kwargs)
|
||||
return 1
|
||||
|
||||
@app.task
|
||||
def handle_sendemail_coachrequest_accepted(email,coachname,name,
|
||||
debug=False,**kwargs):
|
||||
|
||||
fullemail = email
|
||||
subject = '{n} has accepted your coaching request on rowsandall.com'.format(n=coachname)
|
||||
from_email = 'Rowsandall <info@rowsandall.com>'
|
||||
siteurl = SITE_URL
|
||||
if debug:
|
||||
siteurl = SITE_URL_DEV
|
||||
|
||||
d = {
|
||||
'name':name,
|
||||
'coach':coachname,
|
||||
'siteurl':siteurl,
|
||||
}
|
||||
|
||||
res = send_template_email(from_email,[fullemail],
|
||||
subject,'coachrequestacceptedmail.html',
|
||||
d,
|
||||
**kwargs)
|
||||
return 1
|
||||
|
||||
@app.task
|
||||
def handle_sendemail_coachoffer_accepted(coachemail,coachname,name,
|
||||
debug=False,**kwargs):
|
||||
|
||||
fullemail = coachemail
|
||||
subject = '{n} has accepted your coaching offer on rowsandall.com'.format(n=name)
|
||||
from_email = 'Rowsandall <info@rowsandall.com>'
|
||||
siteurl = SITE_URL
|
||||
if debug:
|
||||
siteurl = SITE_URL_DEV
|
||||
|
||||
d = {
|
||||
'name':name,
|
||||
'coach':coachname,
|
||||
'siteurl':siteurl,
|
||||
}
|
||||
|
||||
res = send_template_email(from_email,[fullemail],
|
||||
subject,'coachofferacceptedemail.html',
|
||||
d,
|
||||
**kwargs)
|
||||
return 1
|
||||
|
||||
@app.task
|
||||
def handle_sendemail_coacheerequest(email,name,code,coachname,
|
||||
debug=False,**kwargs):
|
||||
@@ -1743,8 +1835,6 @@ def handle_sendemail_coacheerequest(email,name,code,coachname,
|
||||
'siteurl':siteurl
|
||||
}
|
||||
|
||||
form_email = 'Rowsandall <info@rowsandall.com>'
|
||||
|
||||
res = send_template_email(from_email,[fullemail],
|
||||
subject,'coacheerequestemail.html',d,
|
||||
**kwargs)
|
||||
|
||||
Reference in New Issue
Block a user