Hi I am need of some help and an explanantion! I have the following script which creates a new Excel file with no data instead of attaching the correct and existing Excel file with data that exists in the directory??
Not sure why this is occurring, I modified the same script to attach an existing text document and it worked fine! please help...
my $message = MIME::Lite->new(
From => 'some_address' ,
To => 'some_address',
Subject => 'attach test',
Type => 'text/plain',
Encoding => '8bit',
Data => "attach test");
my $filenamevariable = "$filename$date.xls";
print "$filenamevariable \n";
my $attachmentpath = 'C:\Perl\No_of_Queries_QH_Wed_Sep_22.xls';
# Attach the Excel file
Type => 'application/vnd.ms-excel',
Path => $attachmentpath,
my ($mime_type, $encoding) = ('application/octet-stream', 'base64');