problem using Mail::Audit::Attach under cygwin

Discussion in 'Perl Misc' started by Mark Wood-Patrick, Nov 8, 2003.

  1. 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();
     
    Mark Wood-Patrick, Nov 8, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    660
  2. Warren Tang
    Replies:
    1
    Views:
    551
    Warren Tang
    Sep 17, 2008
  3. Ed Mansouri

    Mail::Audit::Attach

    Ed Mansouri, Feb 6, 2004, in forum: Perl Misc
    Replies:
    0
    Views:
    96
    Ed Mansouri
    Feb 6, 2004
  4. Rob

    Mail::Audit help plz

    Rob, Oct 27, 2005, in forum: Perl Misc
    Replies:
    2
    Views:
    128
  5. Replies:
    3
    Views:
    99
    Peter J. Holzer
    Apr 22, 2006
Loading...

Share This Page