Based on the Gmail Notifier project: http://sourceforge.net/projects/gmail-notify/