freddythunder has asked for the wisdom of the Perl Monks concerning the following question:

Hello again,

Hopefully a quick question. I want to be able to get into a remote mailbox at godaddy. I was going to use PHP for this, but the server I have doesn't have imap_open() and I found it's not too easy to add it to an already running PHP install.

With that said, I found numerous posts about Mail::POP3Client() figured I'd give it a try. I first ran it and found it was not installed. I found a blogpost about cpan and got it installed. Now when I run it, it pauses as if it is doing something, but then I get this error:

Use of uninitialized value $line in pattern match (m//) at /usr/local/share/perl/5.14.2/Mail/POP3Client.pm line 1078, <GEN0> line 2.

use Mail::POP3Client; use strict; use warnings; my $pop = new Mail::POP3Client( USER => "{username}", PASSWORD => "{mypassword}", HOST => "pop.secureserver.net" ); my $i=1; for($i=1;$i<=$pop->Count();$i++){ foreach($pop->Head($i)){ /^(From|Subject):\s+/i && print $_, "\n"; } } $pop->Close();

Thanks! I hope I get this working!

Replies are listed 'Best First'.
Re: Getting into remote mailbox Mail::POP3Client()
by Anonymous Monk on Jul 01, 2013 at 02:52 UTC

    but then I get this error:

    Its a warning, warnings generally don't stop your program, so what happened next?

      Thanks for your response! Nothing happened next. I ran it from the command line and I just got another command line. I'm new to perl so I couldn't tell if it was a warning; I expected some data to spit out if it didn't fail.

      I'm interested on what could have happened for future module use, but since I posted, I tried Net::POP3 and that worked right away.