# 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-2020 Micro Focus or one of its affiliates | Send documentation feedback Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a mail client, and then send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm