Private
Public Access
1
0

AWS working on localhost in debug mode

This commit is contained in:
Sander Roosendaal
2018-03-16 16:08:06 +01:00
parent 4cdb3f4e68
commit ce974ee884
6 changed files with 53 additions and 93 deletions

View File

@@ -52,6 +52,7 @@ import arrow
# testing task
@app.task
def add(x, y):
return x + y
@@ -547,11 +548,13 @@ def handle_sendemailsummary(first_name, last_name, email, csvfile, **kwargs):
pass
return 1
#from rowers.emails import sendemail
@app.task
def handle_sendemailcsv(first_name, last_name, email, csvfile,**kwargs):
# send email with attachment
fullemail = first_name + " " + last_name + " " + "<" + email + ">"
subject = "File from Rowsandall.com"
@@ -559,6 +562,8 @@ def handle_sendemailcsv(first_name, last_name, email, csvfile,**kwargs):
message += "Please find attached the requested file for your workout.\n\n"
message += "Best Regards, the Rowsandall Team"
email = EmailMessage(subject, message,
'Rowsandall <info@rowsandall.com>',
[fullemail])
@@ -573,6 +578,7 @@ def handle_sendemailcsv(first_name, last_name, email, csvfile,**kwargs):
email.attach_file(csvfile2)
os.remove(csvfile2)
res = email.send()
return 1