captkirk has asked for the wisdom of the Perl Monks concerning the following question:
for (my $i = 1; $i <= $tmessages; $i++) { if (!$imap->seen($i)) { $nmessages++; } }
If someone could point me at a more efficient way of getting the unread messages count, or working with IMAP SSL in Mail::IMAPClient, it'd be immensely appreciated! Thanks!use IO::Socket::SSL; use Mail::IMAPClient; $socket = new IO::Socket::SSL("my.mailserver:imaps"); $imap = Mail::IMAPClient->new(Socket => $socket, User => $user, Password => $pass,) or die "Couldn't connect to IMAP server $host as $user: $@\n"; if (!$imap->login) { die "Couldn't authenticate: $@\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: More efficient way to get unseen IMAP messages
by mda2 (Hermit) on May 01, 2006 at 02:49 UTC | |
|
Re: More efficient way to get unseen IMAP messages
by davidrw (Prior) on May 01, 2006 at 02:11 UTC |