kopia lustrzana https://github.com/hholzgra/maposmatic/
prevent exception on trying to send error notifications to admins
see also https://stackoverflow.com/a/53385409user-mgmt
rodzic
bc596ca7cc
commit
58c46ab776
|
@ -331,7 +331,7 @@ class JobRenderer(threading.Thread):
|
||||||
if DAEMON_ERRORS_SMTP_ENCRYPT == "SSL":
|
if DAEMON_ERRORS_SMTP_ENCRYPT == "SSL":
|
||||||
mailer = smtplib.SMTP_SSL()
|
mailer = smtplib.SMTP_SSL()
|
||||||
else:
|
else:
|
||||||
mailer = smtplib.SMTP()
|
mailer = smtplib.SMTP(DAEMON_ERRORS_SMTP_HOST)
|
||||||
mailer.connect(DAEMON_ERRORS_SMTP_HOST, DAEMON_ERRORS_SMTP_PORT)
|
mailer.connect(DAEMON_ERRORS_SMTP_HOST, DAEMON_ERRORS_SMTP_PORT)
|
||||||
if DAEMON_ERRORS_SMTP_ENCRYPT == "TLS":
|
if DAEMON_ERRORS_SMTP_ENCRYPT == "TLS":
|
||||||
mailer.starttls()
|
mailer.starttls()
|
||||||
|
|
Ładowanie…
Reference in New Issue