Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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 having an uproarious good time at the Monastery: (3)
As of 2020-10-31 23:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (291 votes). Check out past polls.

    Notices?