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")