Managing Event Bindings
Topic Last Modified: 2004-06-08
To register your sink to handle transport events using CDO, you must create an event binding between a source and your sink. The Server Extension Objects (SEO) Component Object Model (COM) library is provided to manage these event bindings. To make managing Simple Mail Transfer Protocol (SMTP) and Network News Transfer Protocol (NNTP) transport event bindings with Microsoft® Collaboration Data Objects (CDO) simpler, two Microsoft® Windows® Script Host (WSH) scripts, smtpreg.vbs and nntpreg.vbs, are provided in the Platform SDK. These scripts internally use the SEO component to manage the event sink bindings.
Each binding is identified in the binding database by a globally unique identifier (GUID); however, when managing the bindings, the GUID values are cumbersome. Instead, the scripts support identifying the bindings using the following combination of properties:
The event name; for example, OnArrival, OnPost.
The number of SMTP or NNTP service instance; for example, 1,2,3.
The display name for the binding; for example, "My 1st Binding".
All of the script options in the following sections for the smtpreg.vbs and nntpreg.vbs scripts assume that the three values listed previously are unique for each binding.