email package vs. mimify.mime_encode_header

Ilpo Nyyssönen iny+news at iki.fi
Sat Oct 11 05:38:56 EDT 2003


How do I do the same as mimify.mime_encode_header with the email
package?

The problem:

Python 2.3.2 (#1, Oct 11 2003, 11:13:40) 
[GCC 2.96 20000731 (Red Hat Linux 7.3 2.96-113)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mimify
>>> mimify.mime_encode_header('Ilpo Nyyssönen <my at address.example>')
'Ilpo =?ISO-8859-1?Q?Nyyss=F6nen?= <my at address.example>'
>>> from email.Header import Header
>>> Header('Ilpo Nyyssönen <my at address.example>', 'iso-8859-1').encode()
'=?iso-8859-1?q?Ilpo_Nyyss=F6nen_=3Cmy=40address=2Eexample=3E?='

That doesn't work when I put it in the headers.

-- 
Ilpo Nyyssönen # biny # /* :-) */




More information about the Python-list mailing list