Microsoft KB Archive/898884

= The IMAPIProp::OpenProperty MAPI function returns a MAPI_E_NOT_FOUND (0x8004010F) error =

Article ID: 898884

Article Last Modified on 10/25/2007

-

APPLIES TO


 * Microsoft Exchange Server 2003 Enterprise Edition
 * Microsoft Exchange Server 2003 Standard Edition

-





SUMMARY
On a Microsoft Exchange Server 2003 server, when you try to access an e-mail message by using MAPI, the IMAPIProp::OpenProperty MAPI function may return a MAPI_E_NOT_FOUND (0x8004010F) error. The MAPI_E_NOT_FOUND (0x8004010F) error will apply to one of the following MAPI properties:
 * PR_BODY
 * PR_BODY_HTML
 * PR_RTF_COMPRESSED

Note You may receive a MAPI_E_NOT_FOUND (0x8004010F) error even if there is data in one or more of these MAPI properties.



SYMPTOMS
This problem may occur if all of the following statements are true:
 * The e-mail message arrived at the Exchange Server 2003 server in Simple Mail Transfer Protocol (SMTP) format.
 * The content of the e-mail message was not modified before your application opened the e-mail message by using one of the following MAPI functions:
 * IMsgStore::OpenEntry
 * IMAPIContainer::OpenEntry
 * IMAPISession::OpenEntry
 * The body of the e-mail message was modified by another MAPI client after your application opened the e-mail message, but before your application called the IMAPIProp::OpenProperty MAPI function.



CAUSE
When an e-mail message in SMTP format arrives at the Exchange Server 2003 server, the content of the e-mail message is stored in the .stm file. When a MAPI client accesses the e-mail message, the content of the e-mail message is retrieved from the .stm file. However, if another MAPI client modifies the content of the e-mail message, a MIME-to-MAPI conversion is performed. When this occurs, the content of the e-mail message is promoted from the .stm file to the .edb file.

When your application first accesses the e-mail message, the content of the e-mail message are stored in the .stm file. When another MAPI client modifies the content of the e-mail message after your application first accessed the e-mail message, the content of the e-mail message is promoted from the .stm file to the .edb file. However, the IMessage pointer that is opened by your application is unaware that the content of the e-mail message has been promoted from the .stm file to the .edb file.

Therefore, when your application tries to access the body of the e-mail message, the IMessage pointer that is opened by your application cannot locate the it.



RESOLUTION
In order to access the body of the e-mail message, you must release the current IMAPIProp or IMessage pointer that you have for the e-mail message. Then, you must obtain a new IMAPIProp or IMessage pointer by using one of the MAPI functions that is described in step 2 in the Symptoms section.



STATUS
This behavior is by design.



Steps to reproduce the behavior
 Send an e-mail message in SMTP format to the Exchange Server 2003 server. You can do this by using Microsoft Outlook Express, or by using a simple Microsoft Collaboration Data Ojbects for Windows 2000 (CDOSYS) VBScript. Remember to insert text in the body of the e-mail message.

For more information about how to send an e-mail message by using CDOSYS, click the following article number to view the article in the Microsoft Knowledge Base:

286431 How to send HTML-formatted mail using CDO for Windows 2000 and a remote SMTP service

 Using Extended MAPI on your application, open the e-mail message by using one of the MAPI functions that is described in step 2 in the Symptoms section. Using another MAPI client that is separate from your Extended MAPI code, modify the content of the e-mail message. For example, a simple way to modify the content of the e-mail message is to flag it in Microsoft Outlook. Using your application, open the PR_BODY MAPI property by using the IMAPIProp::OpenProperty MAPI function. You receive a MAPI_E_NOT_FOUND (0x8004010F) error.</li></ol>

Keywords: kbprb KB898884

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.