It looks like your massage contains non utf8 characters. It may have
worked before but may have sent garbage to the recipient.

Try

mail=Mail(encoding='latin1')




On Feb 7, 5:58 pm, Russell <russell.mcmur...@gmail.com> wrote:
> Hi,
>
> Upgraded from 1.71 to 1.74.11.  This works on 1.71:
>
> message = response.render(email_template, email_fields)
> if not mail.send(to=[form.vars.email], subject=message_title,
> message=message):
>     raise RuntimeError('Unable to send email')
>
> But I get this on 1.74.11:
>
> UnicodeDecodeError: 'utf8' codec can't decode byte 0x92 in position
> 431: unexpected code byte
> File "c:\web2py\applications\main\controllers\start.py", line 160, in
> send_status
>   if not mail.send(to=[form.vars.email], subject=message_title,
> message=message):
> File "c:\web2py\gluon\tools.py", line 281, in send
>   text = text.decode(encoding).encode('utf-8')
> File "c:\Python25\Lib\encodings\utf_8.py", line 16, in decode
>   return codecs.utf_8_decode(input, errors, True)
>
> What's changed?
>
> Thanks
> Russell

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to