The TypeResolver class

Abstract

The message type classes in the EXM module.

The Email Experience Manager (EXM) module enables users to create different types of messages. To map a message type to the appropriate class in code, the module uses the TypeResolver class.

The EXM module provides the following message type classes that are derived from the MessageItem base abstract class:

  • TextMail

  • HtmlMail

  • WebPageMail

  • ABTestMessage

For customization purposes, you can create a custom message type class to be used in EXM or delete any of the existing classes.

Depending on the item type, the GetCorrectMessageObject method of the TypeResolver class returns:

  • For not a message item, the method returns null.

  • For a message item, the method returns one of the following types – text mail, HTML mail, webpage mail, or A/B test message.

The following table shows how EXM message templates correspond to the message type classes:

Message template

Message type class

HTML file

The ABTestMessage class

Newsletter Message

The ABTestMessage class

Two-Column Message

The ABTestMessage class

One-Column Message

The ABTestMessage class

Simple HTML Message

The HtmlMail class

Plain Text Message

The TextMail class

Existing Page

The WebPageMail class

Note

The ABTestMessage class is a descendant of the WebPageMail class. It is generally used for messages that contain two or more testable variations, except for the HTML file template, which doesn't support A/B testing. A/B tests also cannot be performed on the message types that are mapped to the other classes: Simple HTML Message, Plain Text Message, and Existing Page.