Test data
Release Inventarsystem / release-docker (push) Successful in 2m16s

This commit is contained in:
2026-08-23 20:46:00 +02:00
parent f77f7024dd
commit cd199f105d
+9 -3
View File
@@ -17,7 +17,7 @@ def _build_smtp_client():
smtp.starttls() smtp.starttls()
smtp.ehlo() smtp.ehlo()
if cfg.EMAIL_USERNAME: if cfg.EMAIL_USERNAME:
smtp.login(cfg.EMAIL_USERNAME, cfg.EMAIL_PASSWORD or "") smtp.login("no-reply@invario-software.de", "#,EATwIn,68" or "")
return smtp return smtp
@@ -68,14 +68,20 @@ def send(email: list | str, subject: str, note: str, sender: str) -> bool:
msg = MIMEMultipart("alternative") msg = MIMEMultipart("alternative")
msg["Subject"] = str(subject) msg["Subject"] = str(subject)
msg["From"] = f"{sender} <{cfg.EMAIL_USERNAME}>" msg["From"] = f"{sender} <no-reply@invario-software.de>"
msg["To"] = str(recipient) msg["To"] = str(recipient)
msg.attach(MIMEText(text_content, "plain")) msg.attach(MIMEText(text_content, "plain"))
msg.attach(MIMEText(html_content, "html")) msg.attach(MIMEText(html_content, "html"))
#smtp.sendmail(
# from_addr=cfg.EMAIL_USERNAME,
# to_addrs=[recipient],
# msg=msg.as_string()
#)
smtp.sendmail( smtp.sendmail(
from_addr=cfg.EMAIL_USERNAME, from_addr="no-reply@invario-software.de",
to_addrs=[recipient], to_addrs=[recipient],
msg=msg.as_string() msg=msg.as_string()
) )