SmarterMailMon is a free utility released by SmarterTools a few years back which monitors a users POP and IMAP mail accounts for new messages. It runs in the system tray and will blink read when new messages are available.
You can download SmarterMailMon here:
http://www.smartertools.com/downloads/Smartermailmon_Setup.exe
We wanted to release the source code for this utility, but the project was too dependant on 3rd party UI utilities. We did not want any 3rd party or SmarterTools dll dependencies with any source code we released. So the following code does not have a lot of the UI elements that make SmarterMon useful, but includes all the logic for grabbing the messages counts from POP and IMAP accounts. Anyone that wants to write their own mail monitor utility can use this as a pretty good base as it just requires improvements to the UI. The code can be downloaded here:
http://www.smartertools.com/downloads/SmarterMailMon.zip
The code was written in C# using Microsoft Visual Studio 2005. and the .Net 2.0 framework and is released under the GNU Lesser General Public License.