Monitor exchange email account
I'm trying to write a program that will listen to an email inbox from an Exchange 2003 mail server, process the subject line of the mail and do something depending on that subject.
For example, I might send 'reply to me' and it will send me an email and so on.
I was thinking of doing this using the JavaMail API to connect to the mailbox (I think this is possible) and use the Timer class to poll the mailbox for new messages at a given interval (rather than use an infinite loop with Thread.sleep()). I've looked at the 'monitor' example in JavaMail but that only seems to be for IMAP and uses an infinite loop.
Can anyone let me know:
1. Is this even possible to an Exchange Server?
2. Is the Timer class the best solution or is there a better way?
3. Is there an implementation already that will save me some dev time?
Thanks in advance.

