From 323e299b7e13407463440d327c1ad0378a780b82 Mon Sep 17 00:00:00 2001 From: Maximilian Wehrstedt Date: Thu, 17 Jun 2021 15:47:39 +0200 Subject: [PATCH] Allow empty password for smpt --- src/restic_compose_backup/alerts/smtp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/restic_compose_backup/alerts/smtp.py b/src/restic_compose_backup/alerts/smtp.py index e6bde1f..8495541 100644 --- a/src/restic_compose_backup/alerts/smtp.py +++ b/src/restic_compose_backup/alerts/smtp.py @@ -15,7 +15,7 @@ class SMTPAlert(BaseAlert): self.host = host self.port = port self.user = user - self.password = password + self.password = password or "" self.to = to @classmethod @@ -34,7 +34,7 @@ class SMTPAlert(BaseAlert): @property def properly_configured(self) -> bool: - return self.host and self.port and self.user and self.password and len(self.to) > 0 + return self.host and self.port and self.user and len(self.to) > 0 def send(self, subject: str = None, body: str = None, alert_type: str = 'INFO'): # send_mail("Hello world!")