Platform SDK: SMTP Server Events |
[This is preliminary documentation and subject to change.]
The MailMsg COM class defines an object used to house a message as it passes through the SMTP service. When a client requests delivery of a message through the SMTP protocol or the local SMTP service pickup directory, an instance of the MailMsg COM class is created to house that message. The client then proceeds to supply necessary information for its delivery, such as to whom the message should be delivered, from whom the message is being sent, and the content of the message itself. As each piece of information is received, it is added to the MailMsg object. The store driver object is responsible for persisting this information in some fashion, such as on the file system or in a database.
References to the object are passed from component to component during processing in the transport. A new object is not created for each step. A MailMsg object is normally only destroyed after its content has been successfully relayed to another service or delivered locally. The store driver that created the message is responsible for providing persistence for the message's transport envelope properties and content as it passes through the system. In the event of an unexpected service interruption or failure, the persisted data for the message is used to recreate the MailMsg object and resubmit it to the transport.