2013-07-12 113 views
0

Outlook.com是否支持EWS?如果不是,使用python訪問用戶任務和日曆有哪些不同的方式?Outlook.com是否支持EWS?

到目前爲止,我已經做了以下內容:

使用EWSWrapper並嘗試了使用suds-ews with python。當我嘗試使用outlook.com帳戶時,所有這些實施失敗。

因此,這裏是我想知道:

  • 如果EWS不可用,我可以做什麼其他的方法來檢索任務和日曆列表。
  • 是否有一個python庫,我可以使用它從2007年到2007年,考慮早期的2007交換服務器,更新一次,並進行基本的錯誤處理。

任何幫助表示讚賞。

回答

0

我是C#開發人員,所以我不知道它如何在Python中工作,但EWS託管API可以與ExchangeOnline一起工作。我已經在使用它。 也許你必須在自動發現中啓用重新創建。請參閱: http://msdn.microsoft.com/en-us/office365trainingcourse_10l_1_topic2

我嘗試使用ServerVersion 2010和2013-Setting連接到Outlook.com,並且兩者都正常工作。

+0

的Exchange Online(Office 365中)是Outlook.com的獨立服務,在不同的軟件堆棧上運行。從歷史上看,某些Office 365終端可以通過outlook.com域訪問,但情況已不再如此。 –

1

Yes it supports now

微軟從傳統的基礎設施,以最新的Office 365的基於基礎設施

遷移繼C#代碼片段將通過EWS從發送的HelloWorld消息outlook.com

var service = new ExchangeService 
{ 
    TraceEnabled = true, 
    TraceFlags = TraceFlags.All, 
    Credentials = new WebCredentials("[email protected]", "[email protected]"), 
    Url = new Uri("https://outlook.com/EWS/Exchange.asmx") 
}; 

var email = new EmailMessage(service); 

email.ToRecipients.Add("[email protected]"); 
email.Subject = "HelloWorld"; 
email.Body = new MessageBody("This is the first email I've sent by using the EWS Managed API."); 
email.Send(); 

更多代碼樣本參觀EWS Managed API docs

+0

,如果你想用=>新的OAuthCredentials(accessToken)來實現它,它會工作嗎? –

0

Outlook.com試圖使用的OAuth2令牌從live.com獲得帳戶時不支持EWS交換服務API更是如此。

建議嘗試使用REST API。 REST API當前在具有Exchange Online和某些Outlook.com帳戶的所有Office 365帳戶上啓用。

你可以找到更詳細的信息吧herehere