From dd94fe58743f7c8314b7c4f48e7b77bc5f4cbed4 Mon Sep 17 00:00:00 2001 From: Luc Papeleux <L.Papeleux@ULiege.be> Date: Tue, 25 Aug 2020 10:05:36 +0200 Subject: [PATCH] fix import MIMEText in Py3 --- parametricJob.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/parametricJob.py b/parametricJob.py index 7c78c8b..4dfc0a9 100644 --- a/parametricJob.py +++ b/parametricJob.py @@ -110,7 +110,8 @@ class ParametricJob(PRMSet): mail['Subject'] = subject #mail.preamble = 'Battery result in attachement \n' machineName = socket.gethostname() - from email.MIMEText import MIMEText + #from email.MIMEText import MIMEText + from email.mime.text import MIMEText text = "Battery result on %s in attachement ...\n" % machineName msg = MIMEText(text, 'html','iso-8859-1') msg['From'] = fromA -- GitLab