You can extract metadata, such as subject, sender, and recipient, from MSG, EML, MBX, PST, and NSF files, by calling the metadata_map()
function on a Session
object (see The Session Class for more information). You can extract a predefined set of metadata fields, individual fields, or both, that are unique to a file format.
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.
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.
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.
|