Default Metadata Set

KeyView internally defines a set of common mail metadata fields that can be extracted as a group from mail formats. This default metadata set is listed in the following table. When you retrieve all metadata for a file—that is, pass NULL for the array of metadata—the complete set of default metadata, not all available metadata in the file, is returned.

Default mail metadata list

Field Name (string to specify) Description
From The display name and email address of the sender.
To The display names and email addresses of the recipients.
Sent The time the message was sent.
Cc The display names and email addresses of recipients who receive copies of the email.
Bcc The display names and email addresses of recipients who received blind copies of the email.
Subject The text in the subject line of the message.
Priority The priority applied to the message.

Because mail formats use different terms for the same fields, the format’s reader maps the default field name to the appropriate format-specific name. For example, when retrieving the default metadata set, the NSF field Importance is mapped to the name Priority and is returned.

You can also extract the default field names individually by passing the field name (such as From, To, and Subject); however, in this case, the string is not mapped to the format-specific name. For example, if you pass Priority in the call, you will retrieve the contents of the Priority field from an MBX file, but will not retrieve the contents of the Importance field from an NSF file.


You cannot pass the field names listed in the table individually for PST files. However, you can pass either the MAPI tag number or one of the constants in the Filter class as integers. See Microsoft Personal Folders File (PST) Metadata.

Extract the Default Metadata Set

To extract the default metadata set, call the ExtractGetSubFileMetadata(int extractFileId, int metadataID, string metaDataName) method. For example:

int[] metaIDs = null;
string[] metaDataName = null;


ExtractSubFileMetadata metadata;

metadata = m_objFilter.ExtractGetSubFileMetadata(extContextId, metaIDs, metaDataName);