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

      Thanks for reply

      Please tell me which pop3 module does works for pop.gmail.com

      I don't want to use any gmail modules like Mail::Webmail::Gmail