Platform SDK: SMTP Server Events

ISmtpInCommandSink Interface

[This is preliminary documentation and subject to change.]

The ISmtpInCommandSink interface defines the method called by an SMTP protocol command source on a registered protocol event sink when an applicable command is received by the SMTP service.

IID
b2d42a0e-0d5f-11d2-aa68-00c04fa35b82
Extends
IUnknown
Local

Remarks

Inbound SMTP protocol event sinks implement the ISmtpInCommandSink interface to receive protocol events. This interface is the source interface for protocol event sources within the SMTP service.

There is only one method on the interface: OnSmtpInCommand. When an inbound SMTP command is received, an event dispatcher proceeds to create an instance of each applicable protocol event sink COM class and then notify them of the event by executing the OnSmtpInCommand method. The event sinks are notified in the order defined by their relative binding priorities.

When the method is entered by the dispatcher thread, four object references are passed on the stack: IServer, ISession, IMailMsgProperties, and ISmtpInCommandContext. Each reference is on an object that stores information about current the SMTP virtual server, the current SMTP session, the current message received, and the current command context respectively. Sink code can use these interfaces to gather relevant information about the event.