RE: attachment names

"Simon, Michael S" <[email protected]> Wed, 20 Jul 2005 16:02:08 -0600
Newsgroups gmane.comp.lang.perl.modules.mail-box
Message-ID <[email protected]>
Thanks.  The msg didn't' seem to work but the following did.  The $msg
would not be at the individual part so it wouldn't find a filename
correct?  There could be more then one.  But at the individual part(s)
is where it will be.  Right?  New to email parsing.

$part->decoded->dispositionFilename is what worked.

PS Great module.
Thanks
______________________________________________________
Michael Simon Actuate Architect
* Work Tel#:  510-272-8010 * Email: [email protected]
______________________________________________________=20


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Mark Overmeer
Sent: Wednesday, July 20, 2005 2:55 PM
To: Simon, Michael S
Cc: Mail-Box Mailinglist
Subject: Re: attachment names

* 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.
>=20
> 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?
>=20
> Thanks for your help.
>=20
> Content-Type: application/octet-stream; name=3D"March31.XLS"
>=20
> Content-Disposition: attachment
>=20
> Content-Transfer-Encoding: base64

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

  my $fn =3D $msg->decoded->dispositionFilename;
--=20
               MarkOv

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