Fix and test error when sending email
This commit is contained in:
parent
8a5c88583f
commit
a09a5159a7
3 changed files with 19 additions and 2 deletions
|
|
@ -67,7 +67,7 @@ def send_confirmation_mail(modeladmin, request, queryset):
|
|||
try:
|
||||
send_mail(subject, body, from_email, to, fail_silently=False)
|
||||
except Exception as err:
|
||||
self.message_user(request, "Échec d'envoi pour le candidat {0} ({1})".format(candidate, err))
|
||||
modeladmin.message_user(request, "Échec d’envoi pour le candidat {0} ({1})".format(candidate, err))
|
||||
else:
|
||||
candidate.date_confirmation_mail = date.today()
|
||||
candidate.save()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue