Platform SDK: SMTP Server Events

ISmtpOutCommandSink::OnSmtpOutCommand

[This is preliminary documentation and subject to change.]

The ISmtpOutCommandSink::OnSmtpOutCommand method is called on registered outbound protocol event sinks when an SMTP out-bound command is about to be transmitted.

HRESULT OnSmtpOutCommand(
  [in] IUnknown  *pServer,
  [in] IUnknown  *pSession,
  [in] IMailMsgProperties  *pMsg, 
  [in] ISmtpOutCommandContext *pContext
);

Parameters

pServer
A reference to an object exposing the IMailMsgPropertyBag interface. This object contains information about this SMTP virtual service instance. Use QueryInterface to retrieve the IMailMsgPropertyBag interface on the object and use this interface to get and set server properties. Information within this object persists for the lifetime of the SMTP virtual service's process.
pSession
A reference to an object exposing the IMailMsgPropertyBag interface. This object contains information about this SMTP virtual service instance. Use QueryInterface to retrieve the IMailMsgPropertyBag interface on the object and use that interface to get and set session properties. Information within this object exists only for the duration of the protocol session and is destroyed when the session ends.
pMsg
A reference to the MailMsg object housing the current message content and properties.
pContext
A reference to the current SMTP protocol service context object.

Return Values

Remarks