http://qs321.pair.com?node_id=1031288

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

Hello monks, I am having a problem attaching an excel file with MIME::Lite. In outlook it says the file is corrupted and opens blank even though it is 328B. Here is my section of code that I attempted to perform this with:
my $msg = MIME::Lite->new( From => 'me@me.com', To => 'me@me.com', #Cc => 'some@other.com, some@more.com', Subject => 'Report', Type => 'multipart/mixed' ); $msg->attach( Type =>'TEXT', Data =>"Here is the Report" ); $msg->attach( Type => 'application/vnd.ms-excel', Encoding => 'base64', Path => "/report.xls", Filename => 'report.xls' ); $msg->send;

Is it something with the encoding that I am not getting?