Use correct encoding for emails. fix #2254

This commit is contained in:
Ruud committed 2013-09-28 16:39:31 +02:00
1 parent ededfcb822
commit 8011634b7a
1 file changed
+2 -1
+2 -1
View File
@@ -2,6 +2,7 @@ from couchpotato.core.helpers.encoding import toUnicode
from couchpotato.core.helpers.variable import splitString from couchpotato.core.helpers.variable import splitString
from couchpotato.core.logger import CPLog from couchpotato.core.logger import CPLog
from couchpotato.core.notifications.base import Notification from couchpotato.core.notifications.base import Notification
from couchpotato.environment import Env
from email.mime.text import MIMEText from email.mime.text import MIMEText
import smtplib import smtplib
import traceback import traceback
@@ -23,7 +24,7 @@ class Email(Notification):
smtp_pass = self.conf('smtp_pass') smtp_pass = self.conf('smtp_pass')
# Make the basic message # Make the basic message
message = MIMEText(toUnicode(message)) message = MIMEText(toUnicode(message), _charset = Env.get('encoding'))
message['Subject'] = self.default_title message['Subject'] = self.default_title
message['From'] = from_address message['From'] = from_address
message['To'] = to_address message['To'] = to_address