From d32537ba9bed1a0df55c44121a9f9e4c54a94a5c Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 30 May 2021 17:26:22 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Use=20UTF8=20encoding=20in=20ema?= =?UTF-8?q?ils?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nest_crawler/alert_trigger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nest_crawler/alert_trigger.py b/nest_crawler/alert_trigger.py index c33b240..c8ec45e 100644 --- a/nest_crawler/alert_trigger.py +++ b/nest_crawler/alert_trigger.py @@ -54,7 +54,7 @@ def send_notification_email(alert): smtpObj.login(os.environ["SMTP_USERNAME"], os.environ["SMTP_PASSWORD"]) smtpObj.sendmail(os.environ["SMTP_FROM_EMAIL"], alert.repository.owner.email, - MESSAGE.format(alert_name=alert.name, now=datetime.now().isoformat())) + MESSAGE.format(alert_name=alert.name, now=datetime.now().isoformat()).encode("utf8")) print("Successfully sent email") except smtplib.SMTPException: print("Error: unable to send email")