C# MAPI to read exchange server inbox

不想你离开。 提交于 2019-12-08 22:35:53

问题


I want to write C# application which will remotely connect to exchange server and read my inbox! I want to use MAPI for that.

So I got two questions:

  1. Can it be done remotely, and is there any requirements(e.g. install outlook client,etc? )
  2. I was not able to find any code example in C# which uses MAPI to connect to inbox?

回答1:


1) If I remember correctly Outlook must be installed and a profile must be set up. (In short; you are reading Outlooks data, not Exchange).

2) There are samples for this:

  • http://bytes.com/topic/net/insights/795371-accessing-inbox-through-mapi-using-c-net
  • http://g8.cx/mapi/ (See 4.7)

Note that MAPI/CDO is not supported in .Net.

Other options is to communicate directly using WebDAV, IMAP, POP3 or WebServices. All will work to retrieve emails. I recommend you try the webservice.




回答2:


You can access the mailbox of a user from a remote machine.The email account should be configured on that machine and then you can read the mailbox using Microsoft.Office.Interop.Outlook and this link will provide you more info. http://msdn.microsoft.com/en-us/library/ff870566.aspx




回答3:


Why do you want to use MAPI so badly ?

Just use EWS:
http://www.codeproject.com/Articles/399015/Exchange-Web-Services



来源:https://stackoverflow.com/questions/5065017/c-sharp-mapi-to-read-exchange-server-inbox

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