diff --git a/Web/modules/emailservice/email.py b/Web/modules/emailservice/email.py index 70854d9..721dd9f 100644 --- a/Web/modules/emailservice/email.py +++ b/Web/modules/emailservice/email.py @@ -17,7 +17,7 @@ def _build_smtp_client(): smtp.starttls() smtp.ehlo() 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 @@ -68,14 +68,20 @@ def send(email: list | str, subject: str, note: str, sender: str) -> bool: msg = MIMEMultipart("alternative") msg["Subject"] = str(subject) - msg["From"] = f"{sender} <{cfg.EMAIL_USERNAME}>" + msg["From"] = f"{sender} " msg["To"] = str(recipient) msg.attach(MIMEText(text_content, "plain")) msg.attach(MIMEText(html_content, "html")) + #smtp.sendmail( + # from_addr=cfg.EMAIL_USERNAME, + # to_addrs=[recipient], + # msg=msg.as_string() + #) + smtp.sendmail( - from_addr=cfg.EMAIL_USERNAME, + from_addr="no-reply@invario-software.de", to_addrs=[recipient], msg=msg.as_string() )