From 7cfaa0a49b84ee4fb691a67913146cb0eefbe84c Mon Sep 17 00:00:00 2001 From: Kraiem Taha Yassine Date: Mon, 24 Jun 2024 18:49:42 +0200 Subject: [PATCH] fix(chalice): fixed send multi-recipient email (#2302) close #2299 --- api/chalicelib/utils/email_handler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/chalicelib/utils/email_handler.py b/api/chalicelib/utils/email_handler.py index 922d30e97..431d4b9ff 100644 --- a/api/chalicelib/utils/email_handler.py +++ b/api/chalicelib/utils/email_handler.py @@ -56,10 +56,10 @@ def send_html(BODY_HTML, SUBJECT, recipient): msg.attach(body) for m in mime_img: msg.attach(m) - + msg["To"] = '' with smtp.SMTPClient() as s: for r in recipient: - msg["To"] = r + msg.replace_header('To', r) try: logging.info(f"Email sending to: {r}") s.send_message(msg)