mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2024-09-21 08:23:20 +00:00
fix exception class
This commit is contained in:
parent
cb5b9692b3
commit
443fc22699
@ -71,7 +71,7 @@ class SMTPTestAPI(APIView):
|
|||||||
to_email=request.data["email"],
|
to_email=request.data["email"],
|
||||||
subject="You have successfully configured SMTP",
|
subject="You have successfully configured SMTP",
|
||||||
content="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
|
# guess error message encoding
|
||||||
msg = b"Failed to send email"
|
msg = b"Failed to send email"
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user