The PR_MESSAGE_CLASS property contains a text string that identifies the sender-defined message class, such as IPM.Note.
Header file: | MAPITAGS.H |
Must be exposed by: | Message objects |
Must be a column in: | Folder contents tables |
Identifier: | 0x001A |
Property type: | PT_TSTRING |
Property tag: | 0x001A001E (0x001A001F for Unicode) |
The message class specifies the type of the message. It determines the set of properties defined for the message, the kind of information the message conveys, and how to handle the message.
The PR_MESSAGE_CLASS property contains ASCII strings concatenated with periods. Each string represents a level of subclassing. For example, IPM.Note is a subclass of IPM and a superclass of IPM.Note.Private.
PR_MESSAGE_CLASS must consist of the ASCII characters 32 through 127 and must not end with a period (ASCII 46). Sort and compare operations must treat it as a case-insensitive string. The maximum possible length is 255 characters, but in order to allow MAPI room to append qualifiers it is recommended that the original length be kept under 128 characters. Note that these lengths are given in characters; on platforms such as Unicode and DBCS (Double-Byte Character Set) the actual byte count could be higher.
Every message is required to furnish the PR_MESSAGE_CLASS property. Normally the client application creating a new message sets PR_MESSAGE_CLASS as soon as IMAPIFolder::CreateMessage returns successfully. But if the property has not been set when the client calls IMAPIProp::SaveChanges, the message store should set it to IPM.
The PR_MESSAGE_CLASS values defined by MAPI are:
IPM.Note for a standard interpersonal message
REPORT.<subject message class>.DR for a delivery report
REPORT.<subject message class>.NDR for a nondelivery report
REPORT.<subject message class>.IPNRN for a read report
REPORT.<subject message class>.IPNNRN for a nonread report
IPM and IPC are intended to be superclasses only, and a message should have at least one subclass qualifier appended before being stored or submitted. For more information on message class usage, see Message Classes. For lists of required and optional properties for message classes, see the subtopics of About Message Properties.
A custom message class can define properties in a reserved range for use with that message class only. For more information, see About Property Identifiers.
Message classes control which receive folder an incoming message is stored in. For more information, see the IMsgStore::GetReceiveFolderTable method.
For more information on using message classes with forms and form servers, see Choosing a Message Class.