From 9e1a180ff1f2999d6d4424097fe08df293220247 Mon Sep 17 00:00:00 2001 From: Hartmut Holzgraefe Date: Sun, 27 Mar 2022 13:08:16 +0200 Subject: [PATCH] properly encode non-ASCII mail contents (Issue #77) --- scripts/render.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/render.py b/scripts/render.py index ea459779..dc9d1392 100755 --- a/scripts/render.py +++ b/scripts/render.py @@ -310,7 +310,7 @@ class JobRenderer(threading.Thread): } msg = template.render(context) - mailer.sendmail(DAEMON_ERRORS_EMAIL_FROM, self.job.submittermail, msg) + mailer.sendmail(DAEMON_ERRORS_EMAIL_FROM, self.job.submittermail, msg.encode("utf8")) LOG.info("Email notification sent.") except Exception as e: LOG.exception("Could not send notification email to the submitter!")