View Single Post
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#14

GMail New Messages Notifier Beecon
Following Beecon retrieves number of unread messages in specified Gmail Inbox.
Substitute <username> and <password> with your personal account information.
Code:
wget -t 1 -T 3 -q -O - https://<username>:<password>@mail.google.com/mail/feed/atom --no-check-certificate | awk 'BEGIN{m=2}/<fullcount>.+<\/fullcount>/{gsub(/<[^>]*>/,"",$0);print $1 " New";if($1>0)m=1;else m=0}END{exit m}'
The Beecon statement will return:
Exit Status 0 (Green Beecon) for 0 New Mails
Exit Status 1 (Yellow Beecon) for >0 New Mails
Exit Status 2 (Red Beecon) for problems fetching Mails
Exit Status -1 (Grey Beecon) for System problems

For PROXY/WGET related info have a look at THIS post

Ciao, No!No!No!Yes!
__________________
Have a look at Queen BeeCon Widget (WIKI) Customizable and flexible widget-based multi-instance monitoring, alerting and interactive tool for the N900
Please provide comments and feedback for having QBW supported and enhanced further - (DONATE) - v1.3.3devel / v1.3.3testing / v1.3.3extras

Last edited by No!No!No!Yes!; 2010-02-26 at 19:52.
 

The Following 3 Users Say Thank You to No!No!No!Yes! For This Useful Post: