PR_MESSAGE_ATTACHMENTS

The PR_MESSAGE_ATTACHMENTS property contains a table of restrictions that can be applied to a contents table to find all messages that contain attachment subobjects meeting the restrictions.

Quick Info

Header file: MAPITAGS.H
May be exposed by: Message objects
Identifier: 0x0E13
Property type: PT_OBJECT
Property tag: 0x0E13000D

Remarks

The PR_MESSAGE_ATTACHMENTS property can be excluded in IMAPIProp::CopyTo operations or included in IMAPIProp::CopyProps operations. As a property of type PT_OBJECT, it cannot be successfully retrieved by the IMAPIProp::GetProps method; its contents should be accessed by the IMAPIProp::OpenProperty method, requesting the IID_IMAPITable interface identifier. Service providers must report it to the IMAPIProp::GetPropList method if it is set, but may optionally report it or not if it is not set.

To retrieve table contents, a client application should call the IMessage::GetAttachmentTable method. For more information, see Attachment Tables.

PR_MESSAGE_ATTACHMENTS can be used for subobject restriction by specifying it in the SSubRestriction structure. This allows the client to limit the view of a container to messages with attachments meeting given criteria. A message qualifies for viewing if at least one row in its attachments table, that is, one attachment, satisfies the subobject restriction.

Note

Using subobject restriction results in the equivalent of an IMAPISession::OpenEntry call on every message in the table. Depending on the client application and the number of messages to be searched, it can affect performance.

The PR_MESSAGE_ATTACHMENTS and PR_MESSAGE_RECIPIENTS properties are similar in usage. Several MAPI properties provide access to tables:

Property Table
PR_CONTAINER_CONTENTS Contents table
PR_CONTAINER_HIERARCHY Hierarchy table
PR_FOLDER_ASSOCIATED_CONTENTS Associated contents table
PR_MESSAGE_ATTACHMENTS Attachment table
PR_MESSAGE_RECIPIENTS Recipient table

See Also

Table Access Properties