KeyView 23.2

# Extract Mail Metadata

You can extract metadata, such as subject, sender, and recipient, from subfiles of mail formats, by calling the `metadata_map()` function on a `Session` object (see The Session Class for more information).

## Default Metadata Set

KeyView internally defines a set of common mail metadata fields that you can extract as a group from mail formats. This default metadata set is listed in the following table.

Default Mail Metadata List

Field Name (string to specify) | Description
--- | ---
`From` | The display name and email address of the sender.
`Sent` | The time that the message was sent.
`To` | The display names and email addresses of the recipients.
`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.

### Extract the Default Metadata Set

To extract the default metadata set, call the `mail_metadata()` function on a `Subfile` object. See The Subfile Class and the subfiles sample program provided with the API for more information.

Copyright 2016-2023 Open Text
Version 23.2 | Last updated March 2023

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL KeyView 23.2

Topic Title: Extract Mail Metadata