tags:

views:

703

answers:

2

I want to write an application using Java6 that can check a users Hotmail inbox for the 'unread message count'!

There is a Javascript API but I will not have a browser instance, and it seems that I need one to use it. (see stakoverflow question: 964392 )

I can use POP3, but since it does not support flags, I can only tell how many 'new' messages there are in the users Inbox since the last time I checked, not how many unread messages there are. ( This is my current implementation, it's not what is required, but is currently all I can achieve )

There is IMAP access, but only for 'premium users'(Hotmail users who pay).

There's also HttpMail access, but this is poorly documented, and from testing, seems it's also only for premium users.

A: 

Unfortunately, this similar question on msdn suggests this is impossible

EDIT:

All I can offer is a half-solution. You could create the html page containing the script suggested by the people on MSDN but instead of setting the value of an input box to the number of unread messages - you could use Ajax to post this number back to your application. This is, of course, not a very robust solution since it depends on the browser and may very well not be cross platform. Another thing you can do is read up on running Javascript on the JVM. I don't know how good that solution is, either, but I think it's more robust once (or rather if) you can get it to work.

laginimaineb
Indeed - this is my Question! I am Cibenix - Hoped I might find a solution here! :)
barryred
A: 

One potential option could be to use the HTMLUnit Java headless web browser to make the requests. HTMLUnit has very good, but not perfect, JavaScript support to handle creating the dynamic content.

Rob Di Marco