I have a perl that is sending emails in a bad format:
"begin 644 Included.doc
M*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ
M*BHJ*BHJ*BHJ*BH*4U5#0T534T953"!-1$XG<R!F;W(@07)C:&EV92!022`M
M($-A;F-E;`HJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ
M*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*@HW-C`T,C<Q-S`Y"BHJ*BHJ*BHJ*BHJ*BHJ"
"
Here is the code used to email the doc file:
$includeListEmail = "NPSTool.IncludeListEmail.txt";
if ($emailFlag eq "Y") {
`uuencode ${includeListEmail} Included.doc > /tmp/test.Included.doc`;
`uuencode ${excludeListEmail} Excluded.doc > /tmp/test.Excluded.doc`;
`echo|mailx -s "TOOL: $myScenario" -a /tmp/test.Included.doc -a /tmp/test.Excluded.doc myemail@yahoo.com`;
}
It seems to be an issue using the uuencode. It is not converting the text report into a word document. OS is Linux redhat 7.2 and using perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi
How can I change my Perl to send the doc file as attachment ?
Thanks