I want to check for specific senders (in my inbox) connecting to the Mail Server via POP3.(just checking the From : bla bla string) Not to download the inbox mails to my system.
This is one way:
use Net::POP3; my $pop = Net::POP3->new($host) or die "Couldn't connect: $!"; my $cnt; unless ( defined ( $cnt = $pop->login($user, $pw) ) ) { $pop->quit; die "Login error"; } if ($cnt > 0) { for my $num ( sort { $a <=> $b } keys %{ $pop->list } ) { print "Msg $num - ", grep /^From: /, @{ $pop->top($num) }; } } else { print "No messages\n"; } $pop->quit;
I for one did not receive the result of your efforts so far. Maybe you forgot to paste it into the message you sent...
-- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>