Hi everybody,
Iam struggling for retrieve mails from mail server using perl
iam facing some problem in blow my code
even i have the mails in my mailserver iam not getting the count of mails
only iam getting count as -1
what was the problem can any body reply back
look at my code
-
$pop = new Mail::POP3Client(USER => $username,PASSWORD => $passwd, HOST=> $host,PORT=> $port,TIMEOUT =>20,AUTH_MODE => 'BEST',DEBUG => 1) || die "cannot establish connection with the pop3 mail server $host, $!";
-
print "Connection established";
-
print $pop->Count();
-
print "<table align=center>";
-
for ($i=1; $i<=$pop->Count(); $i++)
-
{
-
foreach ( $pop->Retrieve( $i ) )
-
{
-
print "<tr><td>$_</td></tr>\n";
-
}
-
}
-
print "</table>";
-
thanking you.
Regards,
shiva krishna