locked
Problem in developing utility exe, written in C#, which can retrieve mail with MAPI protocol from Exchange Server (2010 SP3) RRS feed

  • Question

  • Environment: -

    OS: Windows XP, 7

    Language: - C#

    IDE: - Visual Studio 2008

    Exchange Server: - Exchange Server 2010 S3

    .

    Requirement Description: -

    Client is having Exchange Server 2010 SP3 installed on some server, and they want a utility, written in C# for retrieving mail with MAPI protocol.  And also, they want written exe will be deployed in other machine, rather than Exchange Server machine. 

    .

    Problem Description: -

    We are trying to write program with MAPI for retrieving mail from exchange server, but not getting enough information related to it.

    .

    Now, we have completely stuck at this point, and finding work around for it. Kindly, let us know following: -

    .

    1)  Is this possible to retrieve mail from following Server using MAPI protocol, while utility is running on other machine, rather than Exchange Server?

    2)  Is this possible to retrieve mail from following Server using MAPI protocol, while utility is running on same machine.

    3) – Or, rather than this, we have some other fine way (protocol) for communicating with exchange server.

    .

    Kindly assist, so that we can complete requirement of client.



    Regards, S.P Singh


    • Edited by S.P Singh Wednesday, July 29, 2015 9:24 AM
    Wednesday, July 29, 2015 9:20 AM

Answers

  • VS2008 is OK for Exchange 2010.

    More recent versions need VS2010 or above per Using Managed API, EWS, and Web Services in Exchange

    • Proposed as answer by shiv.mymail Saturday, August 1, 2015 4:26 PM
    • Marked as answer by S.P Singh Saturday, August 1, 2015 4:27 PM
    Wednesday, July 29, 2015 1:52 PM
  • Yes, it does. Use RDOSession.Logon to use an existing profile, LogonExchangeMailbox to connect to Exchange 2010 or older, or LogonHostedExchangeMailbox to connect to Exchange 2010/2013.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    • Proposed as answer by shiv.mymail Saturday, August 1, 2015 4:26 PM
    • Marked as answer by S.P Singh Saturday, August 1, 2015 4:27 PM
    Friday, July 31, 2015 4:33 AM

All replies

  • Hello,

    > - Is this possible to retrieve mail from following Server using MAPI protocol, while utility is running on other machine, rather than Exchange Server?

    Yes, it is. But you need to install a standalone MAPI version and configure a profile programmatically.

    >  Is this possible to retrieve mail from following Server using MAPI protocol, while utility is running on same machine.

    Yes, it is. You need to have a mail profile configured before accessing any emails.

    > – Or, rather than this, we have some other fine way (protocol) for communicating with exchange server.

    You may consider using EWS instead. See EWS Managed API, EWS, and web services in Exchange for more information.

    Wednesday, July 29, 2015 9:35 AM
  • Hi Sir,

    For first Point: -

    Yes, it is. But you need to install a standalone MAPI version and configure a profile programmatically.

     

    Kindly assist us, how to implement it.

    We will be really thankful.

     


    Regards, S.P Singh

    Wednesday, July 29, 2015 11:45 AM
  • Did you have a chance to look at the EWS? 

    There is no need to invent a wheel if you can use EWS. See EWS Managed API, EWS, and web services in Exchangefor more information.

    Wednesday, July 29, 2015 12:14 PM
  • Ok Sir, I will check it and revert you; if I face any problem.

    Thanks.


    Regards, S.P Singh

    Wednesday, July 29, 2015 12:34 PM
  • Does Visual Studio 2008 support development with EWS?
    Wednesday, July 29, 2015 1:27 PM
  • I have never heard that EWS depends on VS version. Moreover, it is easier to install another VS version than create a profile and install standalone MAPI version on the client for accessing emails in Exchange.
    Wednesday, July 29, 2015 1:38 PM
  • VS2008 is OK for Exchange 2010.

    More recent versions need VS2010 or above per Using Managed API, EWS, and Web Services in Exchange

    • Proposed as answer by shiv.mymail Saturday, August 1, 2015 4:26 PM
    • Marked as answer by S.P Singh Saturday, August 1, 2015 4:27 PM
    Wednesday, July 29, 2015 1:52 PM
  • Is there a particular reason why MAPI is to be used? Normally, you need C++ or Delphi to use Extended MAPI. CDO 1.21 (no longer supported) or Redemption (it wraps Extended MAPI) can also be used in C#.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Wednesday, July 29, 2015 3:15 PM
  • There are other protocol available like POP 3, IMAP for fetching mails from code. But user has restriction on these protocol, so they have suggested to provide solution using MAPI.

    Kindly assist.


    Regards, S.P Singh

    Wednesday, July 29, 2015 4:17 PM
  • Hi Sir,

    As on client side they have no restriction on using MAPI. So, they want support on it. I have searched on net and found following link; it seems to me standalone MAPI

    http://www.microsoft.com/en-in/download/details.aspx?id=42040

    Kindly assist; so that I can start coding part.

     


    Regards, S.P Singh

    Wednesday, July 29, 2015 4:28 PM
  • Extended MAPI cannot be used directly (at least not easily) from C#. You'd need C++ or Delphi for that. Or Redemption (whim wraps Extended MAPI).

    EWS is a good alternative.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Wednesday, July 29, 2015 10:54 PM
  • Does Redemption works directly with Exchange Server? And, does it supports all the Exchange Server Version. 

    Regards, S.P Singh


    • Edited by S.P Singh Friday, July 31, 2015 3:52 AM
    Friday, July 31, 2015 3:46 AM
  • Yes, it does. Use RDOSession.Logon to use an existing profile, LogonExchangeMailbox to connect to Exchange 2010 or older, or LogonHostedExchangeMailbox to connect to Exchange 2010/2013.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    • Proposed as answer by shiv.mymail Saturday, August 1, 2015 4:26 PM
    • Marked as answer by S.P Singh Saturday, August 1, 2015 4:27 PM
    Friday, July 31, 2015 4:33 AM