mirror of
https://github.com/ZettaIO/restic-compose-backup.git
synced 2025-10-09 20:00:58 +00:00
Compare commits
2 Commits
5c33ccf0b1
...
b52655a23b
Author | SHA1 | Date | |
---|---|---|---|
|
b52655a23b | ||
|
323e299b7e |
@@ -15,7 +15,7 @@ class SMTPAlert(BaseAlert):
|
|||||||
self.host = host
|
self.host = host
|
||||||
self.port = port
|
self.port = port
|
||||||
self.user = user
|
self.user = user
|
||||||
self.password = password
|
self.password = password or ""
|
||||||
self.to = to
|
self.to = to
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -34,7 +34,7 @@ class SMTPAlert(BaseAlert):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def properly_configured(self) -> bool:
|
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'):
|
def send(self, subject: str = None, body: str = None, alert_type: str = 'INFO'):
|
||||||
# send_mail("Hello world!")
|
# send_mail("Hello world!")
|
||||||
|
Reference in New Issue
Block a user