how to get contact from message recipients table?

R

robert dugal

Using extended MAPI I need to determine how I can get the contact item
for each recipient of a message. I have custom properties stored in
each contact and I need to access them in
IExchExtMessageEvents::OnWriteComplete().

I get the PR_ENTRYID for each recipient from the message's recipient
table
but I cannot seem to open the contact item, OpenEntry() returns
MAPI_E_INVALID_ENTRYID.
 
R

robert dugal

Using extended MAPI I need to determine how I can get the contact item
for each recipient of a message. I have custom properties stored in
each contact and I need to access them in
IExchExtMessageEvents::OnWriteComplete().

I get the PR_ENTRYID for each recipient from the message's recipient
table
but I cannot seem to open the contact item, OpenEntry() returns
MAPI_E_INVALID_ENTRYID.

I looked at the two PR_ENTRYID with Outlookspy and the last 24 bytes
of the recipient PR_ENTRYID is the same as the contact PR_ENTRYID. So
it looks like a hack would be to take the last 24 bytes. Is there any
safer way to accomplish the same thing?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top