mapi

MSG stream Id calculation

I'm trying to calculate the stream name for the named property part of an MSG file, specifically string named properties. The MSG file format specification says that the ID is generated as follows: Stream ID = 0x100m ((ID XOR (GUID index << 1 | 1)) MOD 0x1f Where the ID value is the CRC-32 for the "Unicode name identifier". I'm als...

How to get the path of default profile .pst file (PR_PST_PATH property)

Hello, I´m trying to develop a custom address book provider for outlook. Using MFCMAPI to browse the store I found that the PR_PST_PATH property for the .pst file of the outlook default profile is reachable through IProviderAdmin-Interface. So I tried the following piece of mapi-code: // Get ProfileAdmin LPPROFADMIN lpProfileAdmin = ...

Exchange 5.5 Which Distribution Lists am I a member of?

I'm trying to programatically find out which distribution lists an address entry is a member of. I can do this using LDAP by accessing the memberof property. However, this requires administrative access. Outlook manages to display this information in its GAL view without having admin access. Is there a publicly exposed way of doing this?...

How to create a MAPI32.dll stub to be able to "send as attachment" from MS Word?

Microsoft Word has "send as attachment" functionality which creates a new message in Outlook with the document attached. I would like to replace Outlook with a custom mail agent, but I do not know how to achieve this. Now my mail agent is simply a program that runs, and takes a file name as parameter. As far as I know, "send as attac...

How can I tell whether a given MAPI message is incoming or outgoing?

In a COM-addin for Outlook (using Redemption) I need to be able to determine whether a given message that I'm looking at was received or sent (I only want to act on the incoming ones). Simply looking at the parent folder or the recipients or senders will not work in my case as both incoming and outgoing messages might be thrown together ...

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 luck finding anything that tells me what any of the properties are. P.S. I've seen this...

Not able to access Inbox of Exchange mailbox wiht MAPI.Session Object from VB6 application

I have a vb 6 application whic fetch the emails from Exchange mailbox and copy them in to text file. This was working fine for me. I have a requirement to change the communication protocol to "RPC over https". After implemnting this I am able to login to the mail box throug MS outlook with RPc over https protpcol. My application is not a...

Is there a MAPI API for .NET Applications?

Data comes in by email as a zipped file. The Java solution we wrote tried to parse and download the email automatically and load the data. We ran into all kinds of problems getting through the firewall, and eventually the solution just got put on hold. Because the administrators wouldn’t allow access to an anonymous type of email box. T...

Trying to use Mapi MapiSendMail to send an email with an embedded image

I'm trying to use Mapi MapiSendMail to send an email with an embedded image. Not having any luck. My file keeps showing up in the email as an attachment, not embedded. I see the MapiFileDesc nPosition field, which sounds like it indicates where in the message text the file should be embedded, but it doesn't seem to affect anything. My...

Get email folder from MailItem via MAPI interface

I'm creating a program to automatically generate reports from incoming email attachments and it is almost complete save for one area. The incoming emails are automatically filtered into folders which differentiate which client and server they originate from. I can't figure out how to get the path of the folder from the email Item. I'm u...

Change From address MAPI

I am using MAPI for opening default email client from my C# application, as similar way in this example http://www.codeproject.com/KB/IP/SendTo.aspx?df=100&amp;forumid=257922&amp;select=1801097#xx1801097xx But, is there anyway to define/change from address ? ...

How can I get a user's external e-mail address from a MapiRecipDesc?

I need to know how to get an e-mail address using MAPI. When I examine the contents of a MapiRecipDesc structure (returned, for instance, by a call to MAPIAddress()) I see that the lpszAddress field contains not a normal SMTP address, but what appears to be some sort of an Exchange server query: EX:/o=MMS/ou=Exchange Administrative G...

Is Interop.Outlook multithreaded?

I need to use Outlook Interop objects for generating .MSG files from a web interface. That's why they will be accessed simultaneously by different threads. Is it multithreaded? And another question: Does Outlook need to be initialized (e.g. account set) before using Outlook.Application on a server? ...

Legacy exchange MAPI help?

I'm working with some legacy exchange code and I am having trouble finding information about some methods/constants. A google search reveals others using similar code, but with no explanations. Does anyone have any ideas where I can find proper docs? One constant I am looking for is: SYNC_ASSOCIATED. ...

C# How to get the send of behalf email address in outlook add-in

Hi, 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 [email protected] on behalf of User Name [[email protected]]. The MAPI object has a method SentOnBehalfOfName that returns "User Name" but not the email address. Does anyone know how to rec...

Differentiating between a Compose Inspector and a Read Inspector

Hi, Is there a way to tell if the current inspector window, in Outlook 2007, is a Read window, or a Compose window? I know we can capture events, and set flags on it, but I dont want to capture New/Reply/Forward events. Is there a way to tell this from the Inspector object? Any property? Any MAPI property? A pointer in the right dire...

The guard has gone beserk (or how do I keep multiple MAPI clients running together?)

I have a standalone program that I am trying to hook into MAPI to send emails automatically using the default system (Outlook for the most part) available. For the most part, it works quite well, and everything sends fine. However, after a while, Outlook will start to flip out about my program's accessing the MAPI system, and will star...

MSMapi32 works with 'Negotiate' authentication, but doesn't work with NTLM or Kerberos.

My application uses msmapi32 to connect to Exchange server and download incoming messages. If I use Negotiate authentication in mapi profile, everything works fine, but other options fail. I get a non-descriptive error when calling 'm_session.SignOn();' method. AFAIK, Negotiate just chooses between Kerberos and NTLM, so I'm confused. Al...

How do I programmatically send email w/attachment to a known recipient using MAPI in C++? MAPISendMail()

This question is similar, but does not show how to add a recipient. How do I do both? We'd like the widest support possible for as many Windows platforms as possible (from XP and greater) We're using visual studio 2008 Essentially we want to send an email with: pre-filled destination address file attachment subject line from our...

MAPI Windows 7 64 bit

I've got a legacy application that creates an email message with an attachment. The code uses the MAPI interface to create the message. This code has worked for quite some time. When the application is run on a Windows 7 64 bit machine, the call to MAPILogon fails with a generic error code. Is there an incompatibility with MAPI and Win...