fix exception class

This commit is contained in:
virusdefender 2018-04-24 07:06:33 +08:00
parent cb5b9692b3
commit 443fc22699

View File

@ -71,7 +71,7 @@ class SMTPTestAPI(APIView):
to_email=request.data["email"],
subject="You have successfully configured SMTP",
content="You have successfully configured SMTP")
except smtplib.SMTPException as e:
except smtplib.SMTPResponseException as e:
# guess error message encoding
msg = b"Failed to send email"
try: