SMTP MTM Overview

This section provides an overview of the Simple Mail Transfer Protocol (SMTP) MTM.

Purpose

Provides APIs for sending of Internet emails.

Architectural relationships

The Messaging Middleware architecture defines a framework in which modules (MTMs) can be implemented that provide support for particular messaging protocols. A client MTM provides the API for application engines to use the protocol. The SMTP API provides the client MTM API, plus supporting classes for SMTP, see Email Overview.

Description

The API has four key concepts: SMTP Client MTM, SMTP service settings, progress information, and email message entry information.

SMTP Client MTM

The SMTP Client MTM provides an SMTP-specific operation, to enable automatic sending of waiting messages either immediately or whenever a dial-up connection is made. Some generic messaging operations, such as receiving messages, are not supported by the MTM.

The SMTP Client MTM class is CSmtpClientMtm. Most of the functions in this class are implementations of the virtual functions defined by the CBaseMtm base class. The SMTP Client MTM implements the standard Client MTM APIs including the functions required to allow clients of SendAs to create emails.

  • Commits cached changes to the current message context to the storage controlled by the Message Server.

  • Loads the cache with the message data for the current context

  • Stores and loads the current service settings from the object's cache into the central repository for the current entry.

  • Creates a reply or forward message to the current message context.

  • Searches the specified message parts for the plain text.

SMTP service settings

Settings for SMTP connections are stored in the message store (CMsvStore) for the SMTP service entry. Settings include server address and email address. Encapsulation of service settings is provided by the CImSmtpSettings class.

Progress information

The progress information can be obtained for messaging operations. For SMTP operations, progress information includes such things as connection state and number of messages sent. Progress information is provided by TSmtpProgress.

Email message entry information

Protocol-specific data for a message is stored in fields in its index entry. A class TMsvEmailEntry is provided to read these fields for e-mail protocols (including SMTP).

Related reference