This commit is contained in:
WorldTeacher
2024-08-08 14:56:11 +02:00
parent fba35cdf25
commit 84689c70ed
6 changed files with 31 additions and 30 deletions

View File

@@ -64,7 +64,7 @@ class LoginDialog(Ui_Dialog):
def login(self):
username = self.lineEdit.text()
password = self.lineEdit_2.text()
print(type(username), password)
# print(type(username), password)
# Assuming 'Database' is a class to interact with your database
hashed_password = hashlib.sha256(password.encode()).hexdigest()

View File

@@ -82,7 +82,7 @@ Tel.: 0761/682-778"""
return config.mail.signature
def load_mail_templates(self):
print("loading mail templates")
# print("loading mail templates")
logger.log_info("Loading mail templates")
mail_templates = os.listdir("mail_vorlagen")
logger.log_info(f"Mail templates: {mail_templates}")
@@ -159,12 +159,12 @@ Tel.: 0761/682-778"""
# server.starttls()
# server.auth(mechanism="PLAIN")
if config["mail"]["use_user_name"] is True:
print(config["mail"]["user_name"])
# print(config["mail"]["user_name"])
server.login(config["mail"]["user_name"], password)
else:
server.login(sender_email, password)
server.sendmail(sender_email, tolist, mail)
print("Mail sent")
# print("Mail sent")
# end active process
server.quit()
logger.log_info("Mail sent, closing connection to server and dialog")

View File

@@ -57,4 +57,4 @@ def lauhc_gui():
dialog = MedienAdder()
dialog.show()
app.exec()
print(dialog.mode, dialog.data, dialog.result())
# print(dialog.mode, dialog.data, dialog.result())