Private
Public Access
1
0

send email to sender of unrecognized file

The email processing sends a notification message to the person who
sent a unrecognized file to the workouts@rowsandall.com email address.
This way, people will know that their email has worked and perhaps
stop sending 99 or more emails with the same unsupported file.
This commit is contained in:
Sander Roosendaal
2017-10-23 08:56:10 +02:00
parent 04d5df245b
commit 74e924a3c1
2 changed files with 296 additions and 243 deletions

View File

@@ -92,14 +92,22 @@ def make_new_workout_from_email(rower, datafile, name, cntr=0):
# shutil.copyfileobj(f_in,f_out)
fcopy = "media/"+datafilename
if settings.DEBUG:
res = handle_sendemail_unrecognized.delay(fcopy,
rower.user.email)
res = handle_sendemail_unrecognized.delay(
fcopy,
rower.user.email
)
res = handle_sendemail_unrecognizedowner.delay(
rower.user.email,
rower.user.first_name
)
else:
res = queuehigh.enqueue(handle_sendemail_unrecognized,
fcopy,
rower.user.email)
res = queuehigh.enqueue(handle_sendemail_unrecognizedowner,
rower.user.email,
rower.user.first_name
)
return 0
summary = ''