properly encode non-ASCII mail contents (Issue #77)

user-mgmt
Hartmut Holzgraefe 2022-03-27 13:08:16 +02:00
rodzic 15d1f31050
commit 9e1a180ff1
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

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