Marking your new messages as read without having to go to Gmail in a browser
Friday, February 20th, 2009I use Gmail Notifier. It absolves people of the need to constantly go to mail.google.com in a browser to see if they have new mail. If I have new mail, the mail icon in the menu bar will turn red, so I can forget about it.
The thing is, sometimes you get new mail that’s just not worth the effort of opening a browser tab. (Gmail Notifier gives you a summary of your new mail.) Yet if you don’t actually go into Gmail, those messages will still be considered new, and the Gmail Notifier icon in the menu bar will stay red.
![]()
It does not have a command that lets you tell it to ignore the recent new messages and change its icon back to gray. The red active notifier is surprisingly hard to ignore. So much so that I usually end up going to Gmail and clicking on each new message just so it won’t be counted as new, and the red icon will go away.
Well, not anymore. I put together a simple Python script that uses IMAP to log in and mark the new messages as read. If you want to use it and have Python installed, all you need to do is enable IMAP in your Gmail settings, edit the script to use your username and password, and then execute it whenever you want Gmail Notifier’s red icon to stop glaring at you.
markasread.py (Right-click to download.)
