this is a perl script run by cynapses_karamba. It is supposed to get new mail count from gmail. The problem is that it always dies at "Couldn't log on to server". I've enabled POP3 on gmail. I haven't really programmed in perl, so it's hard for me to debug. Can someone tell what is wrong:
Code:
#!/usr/bin/perl
use Net::POP3;
my $ServerName = "pop.gmail.com";
# If your username contains a @ character you
# must replace it with \@
my $UserName = "myusrname\@gmail.com";
my $Password = "my_pass";
my $pop3 = Net::POP3->new($ServerName,Timeout => 5);
die "Couldn't log on to server" unless $pop3;
my $Num_Messages = $pop3->login($UserName, $Password) + 0;
if ( $Num_Messages == 1 ){
print $Num_Messages ." new\n";
}
elsif ( $Num_Messages > 1 ){
print $Num_Messages ." new\n";
}
else{
print "0 new\n";
}
$pop3->quit();
For those of you who have cynapses_karamba, have you managed to enable network ingoing/outgoing graph? I haven't
