Private
Public Access
1
0

kml email working

This commit is contained in:
Sander Roosendaal
2018-06-06 14:23:10 +02:00
parent 77702aba7c
commit aed878d677
5 changed files with 81 additions and 0 deletions

View File

@@ -749,6 +749,27 @@ def handle_sendemail_unrecognizedowner(useremail, userfirstname,
return 1
@app.task
def handle_sendemailkml(first_name, last_name, email, kmlfile,**kwargs):
# send email with attachment
fullemail = first_name + " " + last_name + " " + "<" + email + ">"
subject = "File from Rowsandall.com"
d = {'first_name':first_name,
'siteurl':siteurl,
}
from_email = 'Rowsandall <info@rowsandall.com>'
res = send_template_email(from_email,[fullemail],
subject,'kmlemail.html',d,
attach_file=kmlfile,**kwargs)
os.remove(kmlfile)
return 1
# Send email with TCX attachment
@app.task