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:
@@ -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 = ''
|
||||
|
||||
Reference in New Issue
Block a user