adding calendar to all team members sending funct
This commit is contained in:
@@ -1321,6 +1321,44 @@ def handle_sendemailcsv(first_name, last_name, email, csvfile,**kwargs):
|
||||
|
||||
return 1
|
||||
|
||||
@app.task
|
||||
def handle_sendemail_ical(first_name, last_name, email, url, icsfile, **kwargs):
|
||||
# send email with attachment
|
||||
fullemail = first_name + " " + last_name + " " + "<" + email + ">"
|
||||
subject = "Calendar File for your sessions from Rowsandall.com"
|
||||
|
||||
if 'debug' in kwargs:
|
||||
debug = kwargs['debug']
|
||||
else:
|
||||
debug = False
|
||||
|
||||
siteurl = SITE_URL
|
||||
if debug:
|
||||
progressurl = SITE_URL_DEV
|
||||
siteurl = SITE_URL_DEV
|
||||
|
||||
|
||||
d = {'first_name':first_name,
|
||||
'siteurl':siteurl,
|
||||
'url':url,
|
||||
}
|
||||
|
||||
from_email = 'Rowsandall <info@rowsandall.com>'
|
||||
|
||||
|
||||
res = send_template_email(from_email,[fullemail],
|
||||
subject,'icsemail.html',d,
|
||||
attach_file=icsfile,**kwargs)
|
||||
|
||||
|
||||
try:
|
||||
os.remove(csvfile)
|
||||
except:
|
||||
pass
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
def handle_sendemailfile(first_name, last_name, email, csvfile,**kwargs):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user