Seems like the problem is that the server after getting the wrong password closes the connection and this way $pop gets undefined?
No, you forget to quit and close the connection, which should be done even if there is a login failure. If you do quit and close the connection, the error message will be gone :) (just move it outside the if-statement)
# print number of msg or complain about failed login if (defined $a[0]) { print "Messages: $a[0]\n"; } else { print "Login failed.\n"; } $pop->quit();
In reply to Re: How to check number of messages using Net::POP3?
by b10m
in thread How to check number of messages using Net::POP3?
by BjoernD
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |