mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-19 09:31:35 +03:00
Revert "Modify check for smtp settings to be kinder to CI"
This reverts commit 6d2d3c9fd3
.
This commit is contained in:
parent
c9573ca069
commit
4c406f5afc
1 changed files with 14 additions and 7 deletions
|
@ -95,15 +95,22 @@ class EmailConfig(Config):
|
||||||
bleach
|
bleach
|
||||||
|
|
||||||
if not self.email_enable_password_reset_from_is:
|
if not self.email_enable_password_reset_from_is:
|
||||||
if (
|
required = [
|
||||||
not self.email_smtp_host
|
"smtp_host",
|
||||||
or not self.email_smtp_port
|
"smtp_port",
|
||||||
or not self.email_notif_from
|
"notif_from",
|
||||||
):
|
]
|
||||||
|
|
||||||
|
missing = []
|
||||||
|
for k in required:
|
||||||
|
if k not in email_config:
|
||||||
|
missing.append(k)
|
||||||
|
|
||||||
|
if (len(missing) > 0):
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
"email.enable_password_reset_from_is is False "
|
"email.enable_password_reset_from_is is False "
|
||||||
"but not all of the following are set: "
|
"but required keys are missing: %s" %
|
||||||
"email.smtp_host, email.smtp_port, email_notif_from"
|
(", ".join(["email." + k for k in missing]),)
|
||||||
)
|
)
|
||||||
|
|
||||||
# Templates for password reset emails
|
# Templates for password reset emails
|
||||||
|
|
Loading…
Reference in a new issue