Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use warnings; use strict; use CGI qw(:standard); use CGI::Carp qw(fatalsToBrowser); print header, start_html('test'); my $email_user = 'email@domain.com; my $email_pass = 'pass'; my $email_server = 'mail.domain.com'; use Net::POP3; my $pop = Net::POP3->new($email_server); if ($pop->login($email_user, $email_pass) > 0) { my $msgnums = $pop->list; # hashref of msgnum => size foreach my $msgnum (keys %$msgnums) { my $msg = $pop->get($msgnum); print @$msg; $pop->delete($msgnum); } print "Logged in"; } else { print "Could not connect to email"; } $pop->quit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::POP3 doesn't connect
by marto (Cardinal) on Mar 18, 2011 at 13:14 UTC | |
by Anonymous Monk on Mar 18, 2011 at 18:16 UTC | |
by Eliya (Vicar) on Mar 18, 2011 at 19:16 UTC | |
|
Re: Net::POP3 doesn't connect
by Eliya (Vicar) on Mar 18, 2011 at 13:10 UTC |