Implementing Transport Event Sinks
Implementing Transport Event Sinks
The Simple Mail Transfer Protocol (SMTP) and Network News Transfer Protocol (NNTP) event sinks are Component Object Model (COM) classes that implement appropriate Microsoft® Collaboration Data Objects (CDO) event interfaces. The following table describes these interfaces and their associated events.
CDO Transport Event Interfaces
Event | Interface | Description |
---|---|---|
OnArrival |
ISMTPOnArrival |
Handles the arrival of messages to the SMTP service. |
OnPostEarly |
INNTPOnPostEarly |
Handles the initial arrival of newsgroup headers for messages to the NNTP service. |
OnPost |
INNTPOnPost |
Handles the arrival of new posts to the NNTP service. |
OnPostFinal |
INNTPOnPostFinal |
Handles all new posts that have been committed to disk or stored by the NNTP service. |
Implementing Sinks with Scripting Languages
Collaboration Data Objects also provides a set of COM classes that implement the necessary event interfaces and then act as scripting hosts for a scripting language. The scripting host acts as an intermediary between the event source and your script. For more information, see Implementing Sinks with Scripting Languages.
Restrictions on Event Sink COM Classes
The following restrictions apply to the type of COM class that can be used as an NNTP or SMTP event sink:
- The class object for the event sink COM class must implement the IClassFactory::CreateInstance method. The event dispatcher always creates an instance of the event sink using the CoCreateInstance COM function.
- Because the CoCreateInstance COM function is used to create sink instances, Distributed Component Object Model (DCOM) cannot be used. Sinks are created with CLSCTX_LOCAL_SERVER context, so using out-of-process COM servers, such as an executable on the local machine, is supported.