Viqiko has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I have /etc/aliases contetns as below
# /etc/aliases testbug: "|cat ./UpadteBug.pl"
and UpadteBug.pl is as
#UpadteBug.pl @Mail = <STDIN>; foreach(@mail){ print $_; }
When i got a mail with attachment (which has bug related info which i use to update bug database) to 'testbug' then UpadteBug.pl is getting invoked. I see contents of mail but not the contents of attachment.
I'm able to see contents of attachment if I input the email (*.msg) file to UpadteBug.pl.
How to see contents attachments of mail using perl script?
Please help. Thanks in advance I see the text in mail as follows:

------_=_NextPart_001_01CAABE0.6AD9E082 Content-Type: text/html; name="ANTmt94081.htm" Content-Transfer-Encoding: base64 Content-Description: ANTmt94081.htm Content-Disposition: attachment; filename="ANTmt94081.htm"
DQo8SFRNTD48SEVBRD48VElUTEU+PC9USVRMRT48bGluayByZWw9InN0eWxlc2hlZXQiIHR5cGU9 InRleHQvY3NzIiBocmVmPSJodHRwOi8vYXd3LnNoLmJlbC5hbGNhdGVsLmJlL3d0L0I0L2Jhc2Vz dHlsZV9kZHRzLmNzcyI+PC9oZWFkPg0KPEJPRFkgPjx0YWJsZSBib3JkZXIgY29scz0iMSIgd2lk dGg9IjEwMCUiIG5vc2F2ZSA+PHRyPjx0ZD48aDE+PGJyPkREVFMgZHVtcCBmb3IgQU5UbXQ5NDA4 MTwvaDE+PC90ZD48L3RyPjx0cj48dGQ+WyZuYnNwOzxBIEhSRUY9Imh0dHA6Ly9hd3cuc2guYmVs LmFsY2F0ZWwuYmUvZGR0cy9CNC9kdW1wYnVnLmNnaT9hcmdzPUFOVG10OTQwODEmZm9ybWF0PXNo b3J0Ij5TaG9ydCBkdW1wPC9BPiZuYnNwO10gOiBUbyBsaW1pdCBsb25nIGVuY2xvc3VyZXMgY2xp ....... ..... ..... ......... ...... ......
I did not which format is this ?

Replies are listed 'Best First'.
Re: How to see contents attachments of mail using perl script?
by Corion (Patriarch) on Feb 10, 2010 at 14:03 UTC