Messaging Application Programming Interface (MAPI) is a messaging architecture and a Component Object Model based API for Microsoft Windows. MAPI allows client programs to become (e-mail) messaging-enabled, -aware, or -based by calling MAPI subsystem routines that interface with certain messaging servers.
Questions tagged [mapi]
690 questions
7
votes
4 answers
Is there a list of IDs for the Outlook MAPI namespace?
I'm working on an Outlook add-in and I'm looking for a complete list that relates that MAPI properties to there names that is a little less vague than this.
There is plenty of documentation on how to access those properties, but I'm not having much…

bill_the_loser
- 185
- 1
- 4
- 13
6
votes
5 answers
Launching email application (MAPI) from C# (with attachment)
In the past I have used MAPISendMail to launch Outlook (or whatever the desired MAPI email application was) from a C++ application with a file attachment. (Similar to say Microsoft Word's Send Email functionality).
I need to do the equivalent from a…

Steven
- 3,878
- 3
- 21
- 21
6
votes
2 answers
Sending Multi-threaded SendEmail request returns General Mapi Failure
I'm using the MAPI code by Dave Brooks.
I am attempting to programatically send out a Crystal Report that is generated.
When I run through the code without threading everything runs fine. The problem is when I use threading I get the return error…

Nathan Koop
- 24,803
- 25
- 90
- 125
6
votes
5 answers
How to open .eml files using Outlook MAPI in C#?
I have a C# application that reads .msg files and extracts the body and the attachments. But when I try to load a .eml file the application crashes. I am loading the files like this:
MailItem mailItem =…

CubaLibre
- 375
- 1
- 2
- 14
6
votes
1 answer
Is there any UI in Windows 10 to change the current MAPI provider?
I want to write a custom send mail handler for Windows, including a Simple MAPI provider.
On Windows, the current MAPI provider is stored in
HKCU/SOFTWARE/Clients/Mail
and
HKLM/SOFTWARE/Clients/Mail
(the former overriding the latter). But I found…

Arno Schoedl
- 159
- 6
6
votes
7 answers
How to send mail on windows (other than MAPI)
When viewing the MSDN MAPI documentation page it says the API is now deprecated. If that's the case, what is the suggested API for sending mail these days?
http://msdn.microsoft.com/en-us/library/dd296734.aspx
Edit: Thanks for all the suggestions,…

Mark Ingram
- 71,849
- 51
- 176
- 230
6
votes
3 answers
C# How to get the send of behalf email address in outlook add-in
I'm trying to get the sender email address from email that is send using another email address.
The sender as shows in outlook is ditribution-lists@domain.com on behalf of User Name [user.name@domain.com].
The MAPI object has a method…

Alin
- 267
- 4
- 15
6
votes
2 answers
Filter Outlook appointments by category
I have written this code to find the total duration of all appointments of a specified category within a specified time range:
private readonly MAPIFolder _timing;
private int CalculateTotalDuration(DateTime start, DateTime end, string category)
{
…

utapyngo
- 6,946
- 3
- 44
- 65
6
votes
1 answer
Validate Rich Text Structure RTF
MS Exchange / Outlook messages store data using MAPI. One common MAPI property contains a rich text version of the message's body (0x1009, PR_RTF_COMPRESSED, PidTagRtfCompressed). If the rich text string has an invalid structure, then Outlook 2003…

Jacob Quisenberry
- 1,131
- 3
- 20
- 48
5
votes
5 answers
email using Access and VBA without MAPI
I would like to send email from Microsoft Access unattended using VBA. I understand that the built-in method “SendObject” uses MAPI meaning security prompts and something like Outlook configured. Since I want to use the Task Scheduler to kick off…

Knox
- 2,909
- 11
- 37
- 65
5
votes
1 answer
How to get email address from the emails inside an Oulook folder via PowerShell?
I have an Outlook folder, let's call it LoremIpsum, where I have more than 1000+ email drafts that I want to enumarate and do some filtering via PowerShell. I can access the folder and see the emails already, using this script:
Function…

JChris
- 1,638
- 5
- 19
- 37
5
votes
2 answers
System.Runtime.InteropServices.COMException (0x800706BE) when getting contact.LastName
Some of our users are getting this exception sometimes (not for every contact):
System.Runtime.InteropServices.COMException (0x800706BE):
The remote procedure call failed. (Exception from HRESULT: 0x800706BE)
at…

Alex
- 7,432
- 20
- 75
- 118
5
votes
2 answers
Convert Outlook REST API item id to MAPI EntryID
is there an officially supported way to convert item ids from the Outlook REST API into an MAPI EntryID?
I am talking about the "Id" field returned for items in the json response of an http GET on a mailbox endpoint like…

SvenC
- 91
- 4
5
votes
1 answer
MAPI - Find file containing MAPI URL (or open message)
I'm using Windows Search API, which returns mapi URLs.
How can I find the file which contains the data for the URL? E.g. the path to the PST file from which that message came?
How can I programatically get the contents or data of the MAPI message…

SRobertJames
- 8,210
- 14
- 60
- 107
5
votes
1 answer
Embed Image to Outlook using extended mapi functions
I need to embed images in an email and preview the email before it is sent in outlook. CDO and Redemption is not an option.
I have tried the following code, but the images just appears as a little block.
procedure AddAttachment(FullFileName:…

Phillip Roux
- 173
- 2
- 10