I was trying to get an email attachment downloaded into a file unsuccessfully.
I used the following simple script:
 
 
use Mail::POP3Client;
use MIME::Parser
 
#email part
$pop = new Mail::POP3Client( USER     => "aba",
                             PASSWORD => "aba",
                             HOST     => "200.45.71.180" );
$msg=1;
$body=$pop->Body($msg);
$pop->Close();
 
#parsing part
$parser = new MIME::Parser;
$entity = $parser->parse_data($body);
 

The aba account is working fine, and it has a unique email with an Excel file attached.
The script works well up to creating a file into the working directory, but is completely different to the original attached file.
Moreover, the name of the downloaded file has nothing to do with the original one.
As far as I know the body is well retrieved, but the parsing is not doing its job.
Any idea about how to get the right email attach downloaded?
 
Thank you all,
 
Alejandro
 
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to