I guess we should check is the address contains non-ascii chars, and
use ore of the other depedning on the result.

On May 5, 1:08 pm, David Zejda <[email protected]> wrote:
> Hi,
>
> headers of my mails are being encoded to utf-8, which causes troubles
> with delivery.
>
> e.g. 'dvid[at]atlas.cz' (where [at] is '@') is being encoded as
>
> =?utf-8?q?dvid=40atlas=2Ecz?=
>
> processed by mailserver as:
>
> [email protected]
>
> after decoding:
>
> "dvid"@[email protected]
>
> To avoid the encoding I changed
>
>         payload['To'] = \
>             header.Header(',
> '.join(to).decode(encoding).encode('utf-8'),'utf-8')
>
> in Auth.send to
>
>         payload['To'] = \
>             header.Header(', '.join(to))
>
> Is there a better solution?
>
> The problem started to appear after upgrade, with some older web2py
> version it was OK.
>
> David

Reply via email to