From 481f9d48728ce876f61bdeae261675502590ae3e Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 6 Mar 2012 17:09:00 +0530 Subject: [PATCH] do not enforce decoding in utf-8 --- py/webnotes/utils/email_lib/send.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/py/webnotes/utils/email_lib/send.py b/py/webnotes/utils/email_lib/send.py index 382d74af74..819ce313d1 100644 --- a/py/webnotes/utils/email_lib/send.py +++ b/py/webnotes/utils/email_lib/send.py @@ -61,8 +61,8 @@ class EMail: Attach message in the text portion of multipart/alternative """ from email.mime.text import MIMEText - if type(message) is not unicode: - message = unicode(message, 'utf-8') + #if type(message) is not unicode: + # message = unicode(message, 'utf-8') part = MIMEText(message.encode('utf-8'), 'plain', 'UTF-8') self.msg_multipart.attach(part) @@ -71,8 +71,8 @@ class EMail: Attach message in the html portion of multipart/alternative """ from email.mime.text import MIMEText - if type(message) is not unicode: - message = unicode(message, 'utf-8') + #if type(message) is not unicode: + # message = unicode(message, 'utf-8') part = MIMEText(message.encode('utf-8'), 'html') self.msg_multipart.attach(part)