mirror of
https://github.com/valitydev/Cortex-Analyzers.git
synced 2024-11-06 09:05:19 +00:00
extend smtplib error
This commit is contained in:
parent
4b7f8ec0e5
commit
e002b05e3d
@ -90,7 +90,11 @@ class Mailer(Responder):
|
||||
server.ehlo()
|
||||
server.login(self.smtp_user, self.smtp_pwd)
|
||||
server.send_message(msg, self.mail_from, [mail_to])
|
||||
except (smtplib.SMTPNotSupportedError, ssl.SSLCertVerificationError):
|
||||
except (
|
||||
smtplib.SMTPNotSupportedError,
|
||||
ssl.SSLCertVerificationError,
|
||||
smtplib.SMTPException,
|
||||
):
|
||||
with smtplib.SMTP(self.smtp_host, self.smtp_port) as server:
|
||||
server.ehlo()
|
||||
server.login(self.smtp_user, self.smtp_pwd)
|
||||
|
Loading…
Reference in New Issue
Block a user