From 81655aec49ebe33fd33ffebfe26e018874a39a37 Mon Sep 17 00:00:00 2001 From: Ruud Date: Wed, 27 May 2015 14:06:27 +0200 Subject: [PATCH] Email not creating body message properly. fix #4996 --- couchpotato/core/notifications/email_.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/couchpotato/core/notifications/email_.py b/couchpotato/core/notifications/email_.py index d1e8fd5..442f439 100644 --- a/couchpotato/core/notifications/email_.py +++ b/couchpotato/core/notifications/email_.py @@ -31,12 +31,12 @@ class Email(Notification): starttls = self.conf('starttls') # Make the basic message - message['Subject'] = '%s: %s' % (self.default_title, toUnicode(message)) - message = MIMEText(toUnicode(message), _charset = Env.get('encoding')) - message['From'] = from_address - message['To'] = to_address - message['Date'] = formatdate(localtime = 1) - message['Message-ID'] = make_msgid() + email = MIMEText(toUnicode(message), _charset = Env.get('encoding')) + email['Subject'] = '%s: %s' % (self.default_title, toUnicode(message)) + email['From'] = from_address + email['To'] = to_address + email['Date'] = formatdate(localtime = 1) + email['Message-ID'] = make_msgid() try: # Open the SMTP connection, via SSL if requested @@ -58,7 +58,7 @@ class Email(Notification): # Send the e-mail log.debug("Sending the email") - mailserver.sendmail(from_address, splitString(to_address), message.as_string()) + mailserver.sendmail(from_address, splitString(to_address), email.as_string()) # Close the SMTP connection mailserver.quit()