Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Mime::Parser question.

by mmittiga17 (Scribe)
on Sep 06, 2011 at 16:44 UTC ( #924429=perlquestion: print w/replies, xml ) Need Help??
mmittiga17 has asked for the wisdom of the Perl Monks concerning the following question:

Hi all, I am using Perl's Pop3 module to download email along with Mime::Parser to detach any files into readable formats. I have never seen this before but I am now getting an error message: no decoder for uuencode at /usr/lib/perl5/site_perl/5.8.8/MIME/ line 789 no decoder for uuencode at /usr/lib/perl5/site_perl/5.8.8/MIME/ line 789 Debug shows this for the first time: with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate I am using pop3 with ssl. Here is my code.

#---set mail credentials---# my $_MAILHOST="xxxxx"; my $_USER="xxxx"; #username my $_PASS="xxxx"; #password #---Define output directory---# my $_OUTDIR="/x/xxx/mail/xxx"; #Output attachments here #---Begin retrieve mail and strip attachment---# my $i = 0; my $parser = new MIME::Parser; my $pop = new Mail::POP3Client( HOST =>$_MAILHOST, USER =>$_USER, PASSWORD =>$_PASS, DEBUG =>2, SOCKET => undef, USESSL => 1 ); $parser->output_dir( $_OUTDIR ); if( $pop->Count() < 0 ) { die "Error accessing POP mailbox"; } for( $i = 0; $i <= $pop->Count(); $i++ ) { my $wholeBody = $pop->HeadAndBody( $i ); ### Automatically attempt to RFC 2047-decode the MIME headers? $parser->decode_headers(0); ### default is false ### Look for uuencode in "text" messages, and extract it? $parser->extract_uuencode(0); ### default is false my $entity = $parser->parse_data( $wholeBody ); #$pop->Delete( $i ); }

If I pull the mail via Outlook I do not have any issues. Any advise will be appreciated.

Replies are listed 'Best First'.
Re: Mime::Parser question.
by Anonymous Monk on Sep 06, 2011 at 17:31 UTC

    What is different between then and now?

    Is your script now running on a different PC? Does it happen with certain emails but not others? How can you cause this?

      Nothing has changed. I have used the same code to pull and extract attachments for different email accounts that receive attachements from different providers. I now believe this has to do with Net::SSLeay and openSSL. Some reason Net::SSLeay will not install via cpan.
      Cannot determine perl version info from lib/Net/ Cannot determine license info from lib/Net/ *** Found OpenSSL-0.9.8e installed in /usr *** Be sure to use the same compiler and options to compile your OpenS +SL, perl, and Net::SSLeay. Mixing and matching compilers is not supported. Do you want to run external tests? These tests *will* *fail* if you do not have network connectivity. [n] + n Checking if your kit is complete... Looks good Writing Makefile for Net::SSLeay cp lib/Net/ blib/lib/Net/ AutoSplitting blib/lib/Net/ (blib/lib/auto/Net/SSLeay) blib/lib/Net/ some names are not unique when truncated to 8 +characters: directory blib/lib/auto/Net/SSLeay:,,, truncate to do +_https,, truncate to do_httpx,,,, get_http3.a +l,,,, truncate +to get_http,,,, head_ht,,,, +truncate to head_htt,,,, post_ht,,,, +truncate to post_htt,,,, put_http3.a +l,,,, truncate +to put_http,, truncate to ssl +_read, truncate to ssl_writ,, truncate to tcp +_read, truncate to tcp_writ cp lib/Net/SSLeay/ blib/lib/Net/SSLeay/ /usr/bin/perl "-Iinc" /usr/lib/perl5/site_perl/5.8.8/ExtUtils/xsubpp +-typemap /usr/lib/perl5/5.8.8/ExtUtils/typemap -typemap typemap SSLe +ay.xs > SSLeay.xsc && mv SSLeay.xsc SSLeay.c gcc -c -I/usr/include -I/usr/inc32 -I/usr/kerberos/include -D_REENTRA +NT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-state +ment -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +-I/usr/include/gdbm -O2 -g -DVERSION=\"1.36\" -DXS_VERSION=\"1.36\" + -fPIC "-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE" SS +Leay.c SSLeay.xs:98:25: error: openssl/err.h: No such file or directory SSLeay.xs:99:27: error: openssl/lhash.h: No such file or directory SSLeay.xs:100:26: error: openssl/rand.h: No such file or directory SSLeay.xs:101:28: error: openssl/buffer.h: No such file or directory SSLeay.xs:102:25: error: openssl/ssl.h: No such file or directory SSLeay.xs:103:74: error: openssl/comp.h: No such file or directory make: *** [SSLeay.o] Error 1 FLORA/Net-SSLeay-1.36.tar.gz /usr/bin/make -- NOT OK Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible Failed during this command: FLORA/Net-SSLeay-1.36.tar.gz : make NO

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://924429]
Approved by ww
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2017-02-24 06:49 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (353 votes). Check out past polls.