Finished forgot password for clients app

This commit is contained in:
Donald Zou
2025-09-05 15:48:11 +08:00
parent 41975973dc
commit 44af7eba11
10 changed files with 401 additions and 25 deletions

View File

@@ -35,7 +35,7 @@ class EmailSender:
def ready(self):
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 = "") -> tuple[bool, str] | tuple[bool, None]:
if self.ready():
try:
self.smtp = smtplib.SMTP(self.Server(), port=int(self.Port()))