
IMAP Perl script for fantastik(fx)
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
Just because not everybody uses POP3 to retreive mail.
Enjoy this little perl script that you can use along with fantastik and fantastikFX themes (may also work with other themes, but not tested, so might require some small changes).
You need Mail::IMAPClient (related debian package is libmail-imapclient-perl). Change account information in the script itself, then edit *.theme to match the script path and name (be aware that the script should be 700 as it contains password!)
I hope this will be useful.
Amoeba
16 years ago
VERY easy to implement into ANY other theme!
Report
Amoeba
16 years ago
foreach my $f ($imap->folders)
{
if ( $f ne "INBOX.Spam" )
{
$i = $i + $imap->unseen_count($f);
}
}
You can probably create an array if there is more than one folder you don't want to count...
Report
mgordon78
16 years ago
Install the IMAPClient, on gentoo:
emerge Mail-IMAPClient
If you only want to know if anything new is in the inbox then instead of the for loop do simply:
$i = $imap->unseen_count("Inbox");
Report