tools (email): fixed bad default value while reading config

This commit is contained in:
Goffi 2019-05-14 20:16:45 +02:00
commit 94f149bce6

View file

@ -50,8 +50,8 @@ def sendEmail(host, to_emails, subject=u"", body=u"", from_email=None):
email_port = int(host.memory.getConfig(None, u"email_port", 25))
email_username = host.memory.getConfig(None, u"email_username")
email_password = host.memory.getConfig(None, u"email_password")
email_auth = C.bool(host.memory.getConfig(None, "email_auth", False))
email_starttls = C.bool(host.memory.getConfig(None, "email_starttls", False))
email_auth = C.bool(host.memory.getConfig(None, "email_auth", C.BOOL_FALSE))
email_starttls = C.bool(host.memory.getConfig(None, "email_starttls", C.BOOL_FALSE))
msg = MIMEText(body, "plain", "UTF-8")
msg[u"Subject"] = subject