【发布时间】:2015-11-26 13:53:35
【问题描述】:
我正在编写 node.js 代码,尝试在新邮件到达收件箱文件夹时使用 EWS API 订阅推送通知。 我通过soap请求成功订阅了推送通知(请参阅下面的soap请求)并获得了带有结果的subscribeId和水印,但是,我无法理解交换服务器如何将实际的电子邮件通知发送回我的应用程序。 有谁知道如何在节点 js 中实现它? 我在网上找到的大多数示例都是用 C# 实现的 (http://www.codeproject.com/Articles/73834/EWS-Mail-Notifier)
订阅推送通知的soap请求是:
<tns:Subscribe xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<tns:PushSubscriptionRequest>
<t:FolderIds>
<t:DistinguishedFolderId Id="inbox"/></t:FolderIds>
<t:EventTypes>
<t:EventType>NewMailEvent</t:EventType>
</t:EventTypes>
<t:StatusFrequency>1</t:StatusFrequency>
<t:URL>http://12.121.22.32:5050/exchange</t:URL>
</tns:PushSubscriptionRequest>
</tns:Subscribe>
谢谢
【问题讨论】:
标签: node.js push-notification exchangewebservices