Properties Set at Message Creation

A client application can create a message with IMAPIFolder::CreateMessage, set its properties with IMAPIProp::SetProps, and add attachments to it. It can then call IMAPIProp::SaveChanges to save the message to a folder, or send the message immediately by calling IMessage::SubmitMessage. (Calling the SubmitMessage method also saves changes.) This step is message submission, which requests that copies of the message be placed in the recipients’ mailboxes.

If you call the IMAPIFolder::CreateMessage method in a folder, the message properties in the following two tables will be set automatically. This occurs even if you have not called IMAPIProp::SetProps, IMAPIProps::DeleteProps, or IMessage::ModifyRecipients. Some of values for these properties (such as PR_CREATOR_ENTRYID) are assigned by the information store provider, some are default values (such as PR_ACCESS_LEVEL) inherited from the folder the message was created in, and some are derived from other values. In other words, values for these properties are assigned automatically, so you need not set them explicitly.

The properties in the following table are defined in the EDKMDB.H file.

Initial Message Properties Defined by Microsoft Exchange Server

Property Designation Description
PR_CREATOR_ENTRYID Contains the address book entry identifier of the user who created the message.
PR_CREATOR_NAME Specifies the display name of the user who created the message.
PR_LAST_MODIFIER_ENTRYID Specifies the entry identifier of the last person to modify the message.
PR_LAST_MODIFIER_NAME Contains the display name of the last person to modify the message.

The following message properties are declared by MAPI in MAPITAGS.H. In their Microsoft Exchange Server implementation, most of these properties are read-only because they are derived or computed values.

Initial Message Properties Defined by MAPI

Property Designation Description
PR_ACCESS Contains a bitmask of flags indicating the operations the client application can perform on the open object.
PR_ACCESS_LEVEL Contains a bitmask of flags indicating the level at which the client application can access the open object.
PR_CREATION_TIME Contains the creation date and time for a message.
PR_DISPLAY_BCC Contains an ASCII list of the display names of any blind copy (BCC) message recipients, each separated by a semicolon (;).
PR_DISPLAY_CC Contains an ASCII list of the display names of any carbon copy (CC) message recipients, each separated by a semicolon (;).
PR_DISPLAY_TO Contains an ASCII list of the display names of the primary (To) message recipients, each separated by a semicolon (;).
PR_HASATTACH Contains TRUE if a message contains at least one attachment.
PR_IMPORTANCE Contains a value indicating the message sender's opinion of the importance of a message.
PR_LAST_MODIFICATION_TIME Contains the date and time the object was last modified.
PR_MAPPING_SIGNATURE Contains the mapping signature for named properties of a particular MAPI object.
PR_MDB_PROVIDER Contains a provider-defined identifier that indicates the type of information store.
PR_MESSAGE_CLASS Contains a text string that identifies the sender-defined message class, such as IPM.
PR_MESSAGE_FLAGS Contains a bitmask of flags indicating the current state of a message object.
PR_MESSAGE_SIZE Contains the sum (in bytes) of the sizes of all properties on a message object.
PR_OBJECT_TYPE Contains the type of an object.
PR_PARENT_ENTRYID Contains the entry identifier of the folder containing a folder or message.
PR_SEARCH_KEY Contains a binary-comparable key that identifies correlated objects for a search.
PR_SENSITIVITY Contains a value indicating the message sender's opinion of the sensitivity of a message.
PR_STORE_ENTRYID Contains the unique entry identifier of the information store in which an object resides.
PR_STORE_RECORD_KEY Contains the unique binary-comparable identifier (record key) of the information store in which an object resides.

In addition to the properties listed in the preceding table, the following properties are present on a message if you call IMAPIFolder::CreateMessage in a public folder: PR_CONVERSATION_INDEX, and PR_REPLICA_SERVER, and PR_CONVERSATION_TOPIC.

If you immediately call IMAPIProp::SaveChanges after creating a message, two more read-only MAPI properties are added: PR_ENTRYID and PR_RECORD_KEY.