AWS working on localhost in debug mode
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user