1

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?
jgauffin
  • 99,844
  • 45
  • 235
  • 372
Hrayrd
  • 61
  • 1
  • 3
  • 6

3 Answers3

3

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:

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.

Tedd Hansen
  • 12,074
  • 14
  • 61
  • 97
  • Thank you for your reply. Can you please provide some more information about web services, information regarding to pros and cons of using web services? 1) Does it support all versions of exchange server or only 2010? 2) Does user(where my application will run) need to enable some web services or install anything else. – Hrayrd Feb 22 '11 at 06:03
0

Why do you want to use MAPI so badly ?

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

Stefan Steiger
  • 78,642
  • 66
  • 377
  • 442
0

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

kunal
  • 956
  • 9
  • 16