Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks
I am getting output "ERROR: Unable to connect" in below code.
Please let me know where is the problem
use Net::POP3; # Constructors #$pop = Net::POP3->new('pop.gmail.com'); $pop = Net::POP3->new('pop.gmail.com', ResvPort => 995, Timeout => + 30, Debug => 1) or die("ERROR: Unable to connect.\n"); $username="sssssss"; $password="sssssss"; print $pop; if ($pop->login($username, $password) > 0) { my $msgnums = $pop->list; # hashref of msgnum => size foreach my $msgnum (keys %$msgnums) { my $msg = $pop->get($msgnum); print @$msg; } } $pop->quit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Pop3 not able to connect
by moritz (Cardinal) on Feb 07, 2011 at 17:46 UTC | |
by Anonymous Monk on Feb 07, 2011 at 17:50 UTC | |
by mr_mischief (Monsignor) on Feb 07, 2011 at 19:36 UTC |