You are not logged in.

#1 2006-07-03 11:30:58

dwight
Member
From: Estonia
Registered: 2005-05-22
Posts: 18

Getting the number of unread emails

I recently got myself a new laptop which has a led for indicating new emails. I've figured out how I can switch it on and off but I haven't figured out how to  do that based on whether there are new emails or not.
I'm using Thunderbird for reading mail and have found a plugin for it that allows to execute an arbitrary command when new mail is received. But this only goes half way for me -  I would like the led to turn off when there are no more unread mails. I could, of course, make a script that turns the led off after, say 2 minutes, but that's not really what I want.
So, does anyone now if there is a way of getting the number of unread emails from Thunderbird?

Offline

#2 2006-07-03 12:55:23

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Getting the number of unread emails

There is, but I'm not a developer, so I'm not exactly sure how you'd go about it. I use the Mailer adesklet, which displays the number of unread mails on the desktop, so maybe you could have a look through it, and find something useful.

Offline

#3 2006-07-03 13:40:18

Cam
Member
From: Brisbane, Aus
Registered: 2004-12-21
Posts: 658
Website

Re: Getting the number of unread emails

Depends on how you check your emails, POP or IMAP. Check the CLI apps to see if they can just output a number or if you know something like Python, Ruby or PHP you could chuck together something simple that would return a number of unread messages.

Offline

#4 2006-07-03 15:30:55

dwight
Member
From: Estonia
Registered: 2005-05-22
Posts: 18

Re: Getting the number of unread emails

Thank you both. After adesklets were mentioned I remebered that gkrellm had some mail check functionality and looked into that. Unfortunately I couldn't get it to do what I want.
However I did manage to cook up a small python script that checks the mail and handles the LED. Why didn't I think of this? smile Now I also have the added bonus of not having to keep the mail client running all the time.
Yay!

Offline

Board footer

Powered by FluxBB