Internationalized To:'s and Cc:'s

Maxim Kuleshov maxim.kuleshov at gmail.com
Tue Oct 6 09:33:37 EDT 2009


Hello!

How should I correctly construct internationalized base64'ed MIME
header?
The problem is that 'real name' _should_ be encoded, but the email
address - should not.
For example, ?utf-8?bla-bla=?= <email at domain> should be the correct
format, and
?utf-8?bla-bla-bla-bla=?= - incorrect.

But email.Header encodes full text including address, and then local
mail server append's local domain name as it is not found in encoded
header in plain form.

I could manually base64 encode real name, append address, put it in
header without encoding, but is there any more suitable way doing it?
(telling Header to leave address part of header un-encoded).



More information about the Python-list mailing list