
kinny
Novice
Oct 13, 2010, 2:52 PM
Post #1 of 4
(837 views)
|
|
Unable to send excel sheet (2 issues)
|
Can't Post
|
|
Hi Gurus, Two Issues : 1. I have created an excel file with WriteExcel. But I am not able to send it as attachment.The attachment reaches the recipient but it says that the file cannot be accessed or it may be corrupted. But I am able to open the file from its location in my hard disk. Here is the code $workBook->close(); my $message = MIME::Lite->new ( Subject => 'Reporting Online', From => 'xxxx@xxx.com', To => 'xxx@xxx.com', Type => 'text/html', Data => $msg ); # add the attachment $message->attach( Type => "text/xls", Path => "$file", #Filename => "$outFile", Disposition => "attachment" ); $message->send('smtp','xxx.xx.xx.net', Debug =>1); 2. I am trying to zip the above file and send as attachment but i am not able to zip it. Any idea why? This is what i used `zip "$file" "$zipFile"`;
|