comparison libervia/backend/tools/common/email.py @ 4270:0d7bb4df2343

Reformatted code base using black.
author Goffi <goffi@goffi.org>
date Wed, 19 Jun 2024 18:44:57 +0200
parents b0c36f3d3e04
children 060d695ae98e
comparison
equal deleted inserted replaced
4269:64a85ce8be70 4270:0d7bb4df2343
60 ) 60 )
61 email_port = int(tools_config.config_get(config, None, "email_port", 25)) 61 email_port = int(tools_config.config_get(config, None, "email_port", 25))
62 email_username = tools_config.config_get(config, None, "email_username") 62 email_username = tools_config.config_get(config, None, "email_username")
63 email_password = tools_config.config_get(config, None, "email_password") 63 email_password = tools_config.config_get(config, None, "email_password")
64 email_auth = C.bool(tools_config.config_get(config, None, "email_auth", C.BOOL_FALSE)) 64 email_auth = C.bool(tools_config.config_get(config, None, "email_auth", C.BOOL_FALSE))
65 email_starttls = C.bool(tools_config.config_get(config, None, "email_starttls", 65 email_starttls = C.bool(
66 C.BOOL_FALSE)) 66 tools_config.config_get(config, None, "email_starttls", C.BOOL_FALSE)
67 )
67 68
68 msg = MIMEText(body, "plain", "UTF-8") 69 msg = MIMEText(body, "plain", "UTF-8")
69 msg["Subject"] = subject 70 msg["Subject"] = subject
70 msg["From"] = email_from 71 msg["From"] = email_from
71 msg["To"] = ", ".join(to_emails) 72 msg["To"] = ", ".join(to_emails)