mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-21 12:34:19 +00:00
🐛 Use UTF8 encoding in emails
This commit is contained in:
parent
27485e8e7e
commit
d32537ba9b
1 changed files with 1 additions and 1 deletions
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue