[plug] MIME Types by file contents

Bernd Felsche bernie at innovative.iinet.net.au
Mon Jul 5 16:49:38 WST 2004


On Monday 05 July 2004 01:57, you wrote:
> I've almost finished the Python MIME mailer.
>
> One problem I encountered was with the known MIME types having
> dubious mappings to filename extensions. The code works around that
> by using it's own "definitive" map of MIME type to extension.
>
> The other problem that I've encountered and not yet resolved is with
> the Python email module not liking news articles in particular.

I've narrowed this down to what could be a bug in the Message module
os Python 2.2's email package; either the __str__(), as_string() or
set_payload() methods.

Inserting a blank line at the start of the problematic files, which
are saved Usenet articles, works around the problem.

Any suggestions, other than automagically inserting the blank line
for text/news type files?

-- 
/"\ Bernd Felsche - Innovative Reckoning, Perth, Western Australia
\ /  ASCII ribbon campaign | Oh what a stumbling track we weave;
 X   against HTML mail     | when first we a Python programme do conceive
/ \  and postings          |






More information about the plug mailing list