简体   繁体   中英

What is the easiest method of working with a mailbox on an exchange server using .NET from a remote client?

So I have to make a windows service that scans incoming mails in a mailbox on an exchange server for specific words and then deletes the mail. The mailbox I will be scanning currently holds more than 70000 mails. I've tried using the exchange WebDAV protocol , but it usually times out before responding. Are there any alternatives to WebDAV?

If you are using Exchange 2007 SP1 or later, you should be able to use Exchange Web Services . Don't be surprised if it isn't particularly fast - I couldn't get it to go faster than around 100 email retrievals per minute. The API was usable fairly quickly, though.

you can try to access the mailbox via imap or pop3.

Also microsoft provide someway to hook the SMTP server. check this link for details.

But I think the solution for you would be a place a gateway server before your exchange infrastructure and use the hook posibilities of postfix or other SMTP.

It turned out that the WebDAV protocol contains several meths for bulk operations as well as list response limitation constructs. The two really useful contructs I found were the Range Header and the BDELETE Method .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM