diff --git a/synapse/config/emailconfig.py b/synapse/config/emailconfig.py index 761ac3311..4318c6f13 100644 --- a/synapse/config/emailconfig.py +++ b/synapse/config/emailconfig.py @@ -23,9 +23,8 @@ class EmailConfig(Config): def read_config(self, config): self.email_enable_notifs = False - email_config = config.get("email", None) - if email_config: - self.email_enable_notifs = email_config.get("enable_notifs", True) + email_config = config.get("email", {}) + self.email_enable_notifs = email_config.get("enable_notifs", True) if self.email_enable_notifs: required = [