Apart from trusting the filename extension? Examining the first few bytes of the attachment for non-ASCII characters (excluding UTF encoding markers) is the only thing that springs to mind.

File::Type perhaps? Or is that overkill?

File::Type wouldn't be overkill if Content Type is missing.

I also think if the Content Type is missing completely, wouldn't that be a good rule? Any indicators that this happens with Ham?

Regards,
KAM

Reply via email to