Re: attachment names

Mark Overmeer <[email protected]> Wed, 20 Jul 2005 23:55:17 +0200
Newsgroups gmane.comp.lang.perl.modules.mail-box
Organization MARKOV Solutions
Message-ID <[email protected]>
* Simon, Michael S ([email protected]) [050720 22:32]:
> I'm intercepting mail messages before being sent out.  If the attachment
> size is > XXX then I need to zip the attachment.  But I can't get a
> handle on what the file name is.  At the bottom of the message is a
> start of an email that is going out.  I need to get a hold of
> the"March31.xls" so that when I zip the file I can call it
> March31.xls.zip or what ever.
> 
> I can get a hold of then entire Content head, but I can't get a hold of
> the name itself.  Do I just need to parse it out myself or am I missing
> something?
> 
> Thanks for your help.
> 
> Content-Type: application/octet-stream; name="March31.XLS"
> 
> Content-Disposition: attachment
> 
> Content-Transfer-Encoding: base64

In http://perl.overmeer.net/mailbox/html
look for method  dispositionFilename()

  my $fn = $msg->decoded->dispositionFilename;
-- 
               MarkOv

------------------------------------------------------------------------
drs Mark A.C.J. Overmeer                                MARKOV Solutions
       [email protected]                          [email protected]
http://Mark.Overmeer.net                   http://solutions.overmeer.net