problem using Mail::Audit::Attach under cygwin

  • Thread starter Mark Wood-Patrick
  • Start date
M

Mark Wood-Patrick

I am getting the following error with Attach:

Can't locate auto/Mail/Audit/Attach/num_attachm.al in @INC (@INC contains:
/usr/
lib/perl5/5.6.1/cygwin-multi /usr/lib/perl5/5.6.1
/usr/lib/perl5/site_perl/5.6.1
/cygwin-multi /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl .) at
mail
..pl line 22

Any ideas what I'm doing wrong? My program looks like

use Mail::pOP3Client;
use Mail::Audit qw(Attach); # Mail::Audit::Attach

$pop = new Mail::pOP3Client( USER => "mark_woodpatrick",
PASSWORD => "koolie_kat",
HOST => "pop.pacbell.yahoo.com" );
for( $i = 1; $i <= $pop->Count(); $i++ ) {
foreach( $pop->Head( $i ) ) {
my $mailHeader = $_;
if ( /Subject: new pictures/ ) {
my $fh;
my @msg = $pop->HeadAndBody( $i );
my $mail = Mail::Audit->new(emergency=>"~/emergency_mbox", data =>
\@msg);

my $num_attachment = $mail->num_attachments;
my $attachments = $mail->attachments;

print $mailHeader, "\n";
#print "XXXX ".$mail->from."num attachments:
".$mail->num_attachments."\n";
print "XXXX "."num attachments: ".$mail->num_attachments()."\n";

# remove_attachments(filename => "\.(exe|scr|pif)",
# smaller_than => 20000);

# $mail->remove_attachments(mime_type => "text/html");

foreach (@$attachments) {
# $_->save($attachdir)
print "mime type: $_->mime_type\n";
next;
# if ($_->mime_type =~ |^image/|);
# $_->remove ;
# if ($_->filename =~ |\.(vcf)$|);
}

next;

if ( open ($fh, ">msg_$i.txt")) {
$pop->HeadAndBodyToFile( $fh, $i );
close($fh);
} else {
print "can't save message $i\n";
}
}
}
}
$pop->Close();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top