Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: More efficient way to get unseen IMAP messages

by davidrw (Prior)
on May 01, 2006 at 02:11 UTC ( #546622=note: print w/replies, xml ) Need Help??


in reply to More efficient way to get unseen IMAP messages

where does $tmessages come from? You can just use Mail::IMAPClient's unseen method:
my @unread = $imap->unseen or warn "Could not find unseen msgs: $@\n";
Also from the docs:
foreach my $f ($imap->folders) { print "The $f folder has ", $imap->unseen_count($f)||0, " unseen messages.\n"; }
I don't know if these are more efficient runtime-wise, but certainly make the code cleaner..

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://546622]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2020-02-21 10:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (94 votes). Check out past polls.

    Notices?