Receive Email Notification (Exchange 2007)

半城伤御伤魂 提交于 2019-12-11 05:58:36

问题


I'm looking to receive delivery notification from Exchange 2007, so that I can record whether an email has been received and resend if a set period elapses without an email being received.

Basically I want to send an email with a delivery receipt from ASP.NET, receive the delivered notification and then update my database to note that the email was actually received... Windows Service or some other way.

I'm in a closed environment - in that the emails in question are only sent internally to manager and other internal users, all using exchange - in the process of upgrading to Exchange 2007.

Whilst I can do some assumption, in that I can deal with ASP.NET throwing no exceptions when I send the email, however I want greater reassurance that the email has been delivered, so that if I don't receive a delivered notification then I can attempt to resend if a delivered notification hasn't been received within a certain period.

I'm open to any suggestions, ideally something that can simple receive notifications in an ASP.NET application or Console App, but if it's a case of getting Exchange 2007 to dump a file in a folder I can potentially deal with that, though it's not ideal.

I've heard Exchange 2007 has an API, but I have zero experience and knowledge of it, so a pointer in the right direction would be great.


回答1:


The notifications are sent to the mailbox specified as the sender in your emails, so you'll have to monitor this mailbox for changes. You can either poll that mailbox every once in a while or use push/pull notifications to be informed by the Exchange server about changes.

Use the EWS Managed API to access the mailbox: EWS Managed API - Download: http://www.microsoft.com/download/en/details.aspx?id=13480 EWS Managed API - SDK: http://msdn.microsoft.com/en-us/library/dd633710(v=exchg.80).aspx

This will also get you started with pull notifications, if required. Push notifications are more complicated, but you can use the code from my CodePlex project for this: http://exchangenotification.codeplex.com/.



来源:https://stackoverflow.com/questions/7407637/receive-email-notification-exchange-2007

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!