Platform SDK: MAPI

Subject Properties

A message's subject line is divided into two parts: a prefix and the text of the main subject. New messages, or messages that are the first in a conversation, have no prefix. Replies most often use the RE: prefix while forwarded messages use FW:. Client applications can specify any prefix, however, as well as any text to include in the main subject.

MAPI defines three message envelope properties to describe a message's subject:

PR_NORMALIZED_SUBJECT
PR_SUBJECT_PREFIX
PR_SUBJECT

PR_NORMALIZED_SUBJECT is a nontransmittable property that is calculated by message store providers when a client calls SaveChanges on a message. PR_NORMALIZED_SUBJECT is read-only to clients and is based on the contents of the other two subject properties: PR_SUBJECT, which, if set, contains a message's subject line, and PR_SUBJECT_PREFIX, which, if set, contains a subject line's prefix.

Clients can, at their discretion, set PR_SUBJECT and PR_SUBJECT_PREFIX by calling IMAPIProp::SetProps; both properties are optional.

Message store providers expect prefix characters to appear at the beginning of message subject lines and to contain from one to three non-numeric, non-whitespace, and non-punctuation characters followed by a colon and a space. Clients that need to do something different with their prefixes, such as include more than three characters or avoid the colon, should always set the PR_SUBJECT_PREFIX property explicitly and always place the prefix at the start of the subject line of the message.

Report messages attempt to preserve the value of the original PR_NORMALIZED_SUBJECT property by appending their new prefix onto the original. For example, the PR_SUBJECT_PREFIX property for a nonread report on a reply might be "Not Read: RE".

Because PR_NORMALIZED_SUBJECT is not calculated until a client calls SaveChanges to save a message, message store providers cannot guarantee its correctness before that time. When PR_SUBJECT_PREFIX is calculated rather than set by clients, its correctness cannot be guaranteed either. The unpredictability of these property values should have no effect on clients that batch and save their changes. Clients that allow their users to work with open messages without making changes might be affected.

For more information on subject properties, see Creating a Message Subject.