email package vs. mimify.mime_encode_header

Tim Roberts timr at probo.com
Thu Oct 16 23:08:15 EDT 2003


iny+news at iki.fi (Ilpo Nyyssönen) wrote:
>
>> Well, "Header" did exactly what you asked it to.  Unfortunately, you didn't
>> ask it to what you wanted it to do.
>
>But with mimify doing the extra work is not necessary. And other point
>is that the Header encodes the whole string and mimify encodes only
>when necessary. This makes the encoded stuff more readable when looked
>without decoding.

Nevertheless, the fact that mimify happens to produce a valid RFC-822
header is purely an accident, and relying on it could be considered a flaw.
The CORRECT procedure is to parse the address into separate tokens, and
encode only the nickname.

>From my point of view this looks like dropping an important feature. I
>really do not want to encode an ascii only header, but if the encoding
>is needed, it needs to be there. With mimify this is handled
>automatically, with Header I would need to do that by hand.

You OUGHT to be doing it by hand in both cases.  You'll need to parse the
name anyway to get the addresses for SMTP.
-- 
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.




More information about the Python-list mailing list