in reply to Sending email with MIME attachments from the UNIX command line

why hard-code a list of valid extensions and mime types when there is an excellent module called File::MMagic module which
detects what kind of file it is and returns the correct mime-type?

see the File::MMagic docs for details, but using it is as simple as:
$mm = new File::MMagic; $res = $mm->checktype_filename("/somewhere/unknown/file");
craig
(cas @ taz . net . au)
  • Comment on Re: Sending email with MIME attachments from the UNIX command line
  • Download Code