On 10 November 1998, Jesus Alberto Oliden Gonzalez
<joliden(_at_)cedetel(_dot_)com(_dot_)mx> wrote:
Hello!
I want to know if it possible to extract the file name of an
attachement appended to an incoming e-mail, and then assign it to a
variable.
Yes, but it would be pretty messy. First, there are two different
places where the filename may live:
- as the "name" parameter to the "Content-Type:" header (the old way,
used by Pine);
- as the "filename" parameter to the "Content-Disposition:" header (the
new way, used by Netscape, Mutt and most of the newer mailers).
Second, you might have trouble finding the right attachment. To an
automated parser, all attachments might look surprisingly alike. :-) Why
exactly do you want to do that anyway?
Regards,
Liviu Daia
--
Dr. Liviu Daia e-mail: daia(_at_)stoilow(_dot_)imar(_dot_)ro
Institute of Mathematics web page: http://www.imar.ro/~daia
of the Romanian Academy PGP key: http://www.imar.ro/~daia/daia.asc