Various Improvements and Changes #1

Open
june wants to merge 9 commits from june/hedgedoc-expire:patches into main
Showing only changes of commit 1911694baf - Show all commits

View file

@ -64,6 +64,7 @@ class EmailSender:
smtp_server = smtplib.SMTP(self.hostname, port=self.port) smtp_server = smtplib.SMTP(self.hostname, port=self.port)
context = ssl.create_default_context() context = ssl.create_default_context()
smtp_server.starttls(context=context) smtp_server.starttls(context=context)
if self.username != "" and self.password != "":
smtp_server.login(self.username, self.password) smtp_server.login(self.username, self.password)
smtp_server.send_message(message) smtp_server.send_message(message)
except Exception as e: except Exception as e: