Platform SDK: CDO for Windows 2000 |
The Microsoft® Windows® 2000 Simple Mail Transfer Protocol (SMTP) and Network News Transfer Protocol (NNTP) services provide an architecture for the addition of customized synchronous transport event sinks. A transport event occurs when some form of message data is transported into or out of the services. One common example of an inbound transport event is the arrival of a message to the SMTP service either over the network or in the SMTP pickup directory.
When such a transport event occurs, a source for this event notifies (executes) transport event sinks, each of which can take some type of action based on the data content of the message. The term synchronous event means that the event source performs no other action with the message data after passing it to the sink until the sink has returned. In other words, the source is blocked for the duration of the sink's execution. While the sink is executing, it has exclusive control of the message data and state.
The architecture for the SMTP and NNTP source and sink event system is based on the Component Object Model (COM). A transport event sink is defined as any COM object that implements the appropriate COM interface for the event. An event source is defined as a process or thread that notifies sinks using the COM run time when a particular event has occurred. The source needs no information about the internal details of the sink; its only requirements are that the sink be a COM object and that it implements the required COM interface.
You can use the Microsoft® Collaboration Data Objects (CDO) for Microsoft Windows 2000 and CDO for Microsoft® Exchange® 2000 COM components to create event sinks for the set of SMTP and NNTP transport events described in the following documentation. You can create these sinks in any programming or scripting language that supports COM and OLE Automation, including programming languages such as Microsoft® Visual C++®, Microsoft® Visual Basic®, and Microsoft® Visual J++®; and scripting languages such as Visual Basic, Scripting Edition (VBScript), and Microsoft® JScript®.