TwistedPear has asked for the wisdom of the Perl Monks concerning the following question:
Greetings enligthened ones :)
I'm writing a script that is attempting to send and recieve emails containing file attachments.
The script is designed to run over a large collection of files and send and recieve each file individually (there is a mail server on the local machine that is handling the mail itself).
My question is this: is there an easy way to work out what kind of MIME type the file about to be sent is?
The collection contains all kinds of files; from text and html files to com and exe apps. It would be nice if I didn't have to write a rather large hash of extensions => MIME Types :)
I am using MIME::Tools to encode/send/decode the emails and Net::POP3 to recieve them.
Cheers
TwistedPear
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jeffa) Re: Finding out mime types...
by jeffa (Bishop) on May 21, 2003 at 06:12 UTC | |
by merlyn (Sage) on May 21, 2003 at 07:17 UTC | |
|
Re: Finding out mime types...
by Jenda (Abbot) on May 21, 2003 at 19:01 UTC |