Compare commits

...

1 Commits

Author SHA1 Message Date
Aiirondev_dev cbc805919a changes to the Email behaivior 2026-09-16 17:45:16 +02:00
+7 -9
View File
@@ -9,16 +9,14 @@ import Web.modules.database.settings as cfg
def _build_smtp_client():
smtp = smtplib.SMTP(
cfg.EMAIL_SMTP_HOST,
cfg.EMAIL_SMTP_PORT,
timeout=cfg.EMAIL_TIMEOUT_SECONDS,
"mail.invario-software.de",
587,
timeout=1,
)
smtp.ehlo()
if cfg.EMAIL_USE_TLS:
smtp.starttls()
smtp.ehlo()
if cfg.EMAIL_USERNAME:
smtp.login(cfg.EMAIL_USERNAME, cfg.EMAIL_PASSWORD or "")
smtp.starttls()
smtp.ehlo()
smtp.login("no-reply@invario-software.de", "#,EATwIn,68")
return smtp
@@ -76,7 +74,7 @@ def _send_message(email: list | str, subject: str, note: str, sender: str, attac
msg = MIMEMultipart("mixed" if attachment else "alternative")
msg["Subject"] = str(subject)
from_address = cfg.EMAIL_FROM_ADDRESS or cfg.EMAIL_USERNAME or "no-reply@invario-software.de"
from_address = "no-reply@invario-software.de"
msg["From"] = f"{sender} <{from_address}>"
msg["To"] = str(recipient)