diff --git a/mail2redmine.py b/mail2redmine.py index 8501b05..ad58cd2 100644 --- a/mail2redmine.py +++ b/mail2redmine.py @@ -52,11 +52,11 @@ def parse_attachment(data): def send_mail(to, subject, message): s = smtplib.SMTP('localhost') from_mail = 'redmine@entrouvert.com' - msg = email.mime.text.MIMEText(message, 'plain', 'utf-8') + msg = email.mime.Text.MIMEText(message, 'plain', 'utf-8') msg['From'] = from_mail msg['To'] = to msg['Subject'] = subject - s.sendmail(from_email, to, msg.as_string()) + s.sendmail(from_mail, to, msg.as_string()) s.quit()