Commit 1e45d63b5122b242c8b080be23e3b9799254bf44
1 parent
68c93c8e
Exists in
master
and in
39 other branches
Adding logging message when sending emails fail
Showing
1 changed file
with
2 additions
and
0 deletions
Show diff stats
src/super_archives/views.py
| 1 | 1 | # -*- coding: utf-8 -*- |
| 2 | 2 | |
| 3 | 3 | import smtplib |
| 4 | +import logging | |
| 4 | 5 | |
| 5 | 6 | from django import http |
| 6 | 7 | from django.conf import settings |
| ... | ... | @@ -212,6 +213,7 @@ class EmailValidationView(View): |
| 212 | 213 | send_verification_email(email_addr, request.user, |
| 213 | 214 | email.validation_key) |
| 214 | 215 | except smtplib.SMTPException: |
| 216 | + logging.exception('Error sending validation email') | |
| 215 | 217 | return http.HttpResponseServerError() |
| 216 | 218 | |
| 217 | 219 | return http.HttpResponse(status=204) | ... | ... |