none
MAPI Wrapper RRS feed

  • Question

  • I want to open a outlook mail programatically through C# with pre-populated To,Subject,Attachment values. I am planning to use MAPI Wrapper. I heard from my friends there are limitation in the MAPI Wrapper.

    What are all the limitation by using MAPI Wrapper? Can this functionality will work in iphone/ipad/androiod/mac book?

    What will be the best alternate for MAPI Wrapper?

    Thanks for your help in advance.


    http://www.selvaonline.com - Live a Happy & Balanced Life

    Monday, September 10, 2012 4:07 PM

Answers

All replies

  • Can you please clarify what you mean by a "MAPI Wrapper"?  By definition, that term denotes a COM based object model that is developed using MAPI but is available for use by any COM-aware programming language.  The Redemption library (http://www.dimastr.com) is a classic example of a MAPI Wrapper.

    However, MAPI as an API is only available for use within C++ or Delphi (so you can't create a MAPI application for iOS/Android/Mac).  If you are using C# then you would use the Outlook Object Model (or Redemption) to programmatically create Outlook items in Windows applications or an Outlook add-in.

    For an intro to Outlook programming, I suggest looking here:

    Outlook 2010 Developer Reference:
    http://msdn.microsoft.com/en-us/library/ff870432.aspx


    Eric Legault MVP (Outlook)
    About me...
    Try Outlook Appins - affordable and easy to use!

    Monday, September 10, 2012 4:23 PM
    Moderator
  • I am planning to use something like this http://www.codeproject.com/Articles/2048/Simple-MAPI-NET. What is the disadvantage/limitation by create  a wrapper class for MAPI API and use in .net.

    What is the best approach for sending mail with attachment by programatically in c#.


    http://www.selvaonline.com - Live a Happy & Balanced Life

    Monday, September 10, 2012 6:50 PM
  • Simple MAPI is so limited, why on earth would you want to do that instead of just directly using Outlook automation code?

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "SelvaOnline" <=?utf-8?B?U2VsdmFPbmxpbmU=?=> wrote in message news:8f5f6008-2e3a-4cba-807a-84e6c2bc8ed5...

    I am planning to use something like this http://www.codeproject.com/Articles/2048/Simple-MAPI-NET. What is the disadvantage/limitation by create  a wrapper class for MAPI API and use in .net.

    What is the best approach for sending mail with attachment by programatically in c#.


    http://www.selvaonline.com - Live a Happy & Balanced Life


    Ken Slovak MVP - Outlook
    Monday, September 10, 2012 7:07 PM
    Moderator
  • That code project is quite old; you can use System.Net.Mail instead.  I'm not sure exactly if you are developing an Outlook solution, or a messaging solution.  For the former, I suggest you take a look at this resource:

    Selecting an API or Technology for Developing Outlook Solutions:
    http://msdn.microsoft.com/en-us/library/gg608200.aspx

    For the latter:

    The support guidelines for client-side messaging development:
    http://support.microsoft.com/kb/266353


    Eric Legault MVP (Outlook)
    About me...
    Try Outlook Appins - affordable and easy to use!

    Monday, September 10, 2012 7:09 PM
    Moderator
  • I am developing a outlook solution  and I need to open a new mail with per-populated attachment on some user action. Also i need to read recipient list from exchange name instead of individual mail.  Can this achievable via System.Net.Mail ?


    http://www.selvaonline.com - Live a Happy & Balanced Life


    • Edited by SelvaOnline Monday, September 10, 2012 8:46 PM
    Monday, September 10, 2012 8:31 PM
  • Can you suggest some direction on this ?

    http://www.selvaonline.com - Live a Happy & Balanced Life

    Monday, September 10, 2012 9:04 PM
  • Take a look at the references Eric suggested.
     
    From what you said, I would use the Outlook object model and Outlook automation code, but that would depend on whether everyone who would run the code has Outlook and where the code would run.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "SelvaOnline" <=?utf-8?B?U2VsdmFPbmxpbmU=?=> wrote in message news:1ec0a6df-a349-47a9-a5fd-4c59e766b4bd...
    Can you suggest some direction on this ?

    http://www.selvaonline.com - Live a Happy & Balanced Life


    Ken Slovak MVP - Outlook
    Monday, September 10, 2012 9:28 PM
    Moderator
  • Why do you want to use System.Net.Mail? If this is an Outlook-base solution, you need to develop either a COM Add-in or use VBA macros.

    See here for an example of how to create an e-mail:

    Application.CreateItem Method (Outlook):
    http://msdn.microsoft.com/en-us/library/ff869635.aspx


    Eric Legault MVP (Outlook)
    About me...
    Try Outlook Appins - affordable and easy to use!

    Tuesday, September 11, 2012 2:50 AM
    Moderator