See that: http://groups.google.com/group/web2py/browse_frm/thread/6ff484a8d651a935/edb931e024aaff32?lnk=gst&q=when+send+email#edb931e024aaff32
at line 285 in gluon/tools.py. I changed the attachment.attach(MIMEText.MIMEText(text)) line to attachment.attach(MIMEText.MIMEText(text,_charset='utf-8')) Some more patch for headers: gluon/tools.py from line 259: payload['To'] = header.Header(', '.join(to).decode(encoding).encode('utf-8'),'utf-8') ... payload['Reply-To'] = header.Header(reply_to.decode(encoding).encode('utf-8'),'utf-8') ... payload['Subject'] = header.Header(subject.decode(encoding).encode('utf-8'),'utf-8') ... payload['Cc'] = header.Header(', '.join(cc).decode(encoding).encode('utf-8'),'utf-8') ... payload['Bcc'] = header.Header(', '.join(bcc).decode(encoding).encode('utf-8'),'utf-8') On ápr. 8, 15:39, hywang <why00...@163.com> wrote: > To view theemailcorrectly when receive it, I have to specify > charset to "utf-8" to > avoid Mojibake. > > And the default charset that tools.Mail uses is charset=us-ascii. > > For your convenience, you can test it with these two word "测试" -- To unsubscribe, reply using "remove me" as the subject.