[FIX] unicode problem in mail sending
authorChristophe Simonis <christophe@tinyerp.com>
Thu, 5 Mar 2009 12:14:16 +0000 (13:14 +0100)
committerChristophe Simonis <christophe@tinyerp.com>
Thu, 5 Mar 2009 12:14:16 +0000 (13:14 +0100)
bzr revid: christophe@tinyerp.com-20090305121416-pn3jr87wyrnj220d

bin/tools/misc.py

index 0ca02ba..2cf387d 100644 (file)
@@ -331,7 +331,7 @@ def email_send(email_from, email_to, subject, body, email_cc=None, email_bcc=Non
     else:
         msg = MIMEMultipart()
 
-    msg['Subject'] = Header(subject.decode('utf8'), 'utf-8')
+    msg['Subject'] = Header(ustr(subject), 'utf-8')
     msg['From'] = email_from
     del msg['Reply-To']
     if reply_to: