prevent exception on trying to send error notifications to admins

see also https://stackoverflow.com/a/53385409
user-mgmt
Hartmut Holzgraefe 2022-03-16 10:43:27 +01:00
rodzic bc596ca7cc
commit 58c46ab776
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -331,7 +331,7 @@ class JobRenderer(threading.Thread):
if DAEMON_ERRORS_SMTP_ENCRYPT == "SSL":
mailer = smtplib.SMTP_SSL()
else:
mailer = smtplib.SMTP()
mailer = smtplib.SMTP(DAEMON_ERRORS_SMTP_HOST)
mailer.connect(DAEMON_ERRORS_SMTP_HOST, DAEMON_ERRORS_SMTP_PORT)
if DAEMON_ERRORS_SMTP_ENCRYPT == "TLS":
mailer.starttls()