mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-07-28 01:12:22 +00:00
Fixed email sender validation
This commit is contained in:
parent
042160e6bd
commit
722cbb6054
@ -33,7 +33,7 @@ class EmailSender:
|
|||||||
return self.DashboardConfig.GetConfig("Email", "send_from")[1]
|
return self.DashboardConfig.GetConfig("Email", "send_from")[1]
|
||||||
|
|
||||||
def ready(self):
|
def ready(self):
|
||||||
return len(self.Server()) > 0 and len(self.Port()) > 0 and len(self.Encryption()) > 0 and len(self.Username()) > 0 and len(self.Password()) > 0 and len(self.SendFrom())
|
return all([self.Server(), self.Port(), self.Encryption(), self.Username(), self.Password(), self.SendFrom()])
|
||||||
|
|
||||||
def send(self, receiver, subject, body, includeAttachment = False, attachmentName = ""):
|
def send(self, receiver, subject, body, includeAttachment = False, attachmentName = ""):
|
||||||
if self.ready():
|
if self.ready():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user