From 5c0dd674e982b98e71db2629e42e0d3fcbb113a9 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 21 Jun 2012 11:30:32 +0530 Subject: [PATCH] fix in email send error --- py/webnotes/utils/email_lib/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/py/webnotes/utils/email_lib/__init__.py b/py/webnotes/utils/email_lib/__init__.py index 24873fdfde..58ea04bcf7 100644 --- a/py/webnotes/utils/email_lib/__init__.py +++ b/py/webnotes/utils/email_lib/__init__.py @@ -77,6 +77,7 @@ def sendmail(recipients, sender='', msg='', subject='[No Subject]', txt=None, \ email.set_text(txt) else: try: + msg_unicode = msg if isinstance(msg, str): msg_unicode = unicode(msg, 'utf-8', 'ignore') email.set_text(html2text(msg_unicode))