通過 Java 訪問 Hotmail 未讀郵件計數 (Access Hotmail Unread Mail Count via Java)


問題描述

通過 Java 訪問 Hotmail 未讀郵件計數 (Access Hotmail Unread Mail Count via Java)

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.


參考解法

方法 1:

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.

方法 2:

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.

(by barryredlaginimainebRob Di Marco)

參考文件

  1. Access Hotmail Unread Mail Count via Java (CC BY-SA 3.0/4.0)

#hotmail #java






相關問題

dapatkan kontak aol menggunakan oauth api (get aol contacts using oauth api)

跟踪代理 Hotmail 後面的 IP 地址 (Track IP address behind proxy Hotmail)

Праблемы Hotmail і Outlook з радыёкнопкамі (Hotmail and Outlook issues with radio buttons)

Hotmail "kéo dài" chữ ký HTML / CSS không chính xác (Hotmail incorrectly "stretching" HTML/CSS signature)

向 hotmail 帳戶發送電子郵件 (Sending email to hotmail accounts)

如何在 openID 站點中使用 Microsoft 帳戶? (How to use Microsoft Account in an openID site?)

使用 CakePHP 導入電子郵件聯繫人 (Gmail Yahoo Hotmail) (Import email contacts (Gmail Yahoo Hotmail) using CakePHP)

通過 Java 訪問 Hotmail 未讀郵件計數 (Access Hotmail Unread Mail Count via Java)

SMTPAuthenticationError:Django 中的身份驗證不成功 [BL1PR13CA0128.namprd13.prod.outlook.com] (SMTPAuthenticationError: Authentication unsuccessful [BL1PR13CA0128.namprd13.prod.outlook.com] in Django)

Hotmail - HTML 電子郵件表格圖像間隙 (Hotmail - HTML Email Table image gap)

Yahoo、Gmail、Hotmail 和 AOL 是否有白名單? (Are there white lists for Yahoo, Gmail, Hotmail and AOL?)

hotmail集群數據存儲是如何工作的? (How does a hotmail cluster data storage work?)







留言討論