Platform SDK: CDO for Windows 2000 |
Additional configuration information for each binding is stored in the Source and Sink property bags. The set of properties used within the Sink and Source property bags depends on the source and sink implementation. The following sections describe the set of Source and Sink properties used when creating Simple Mail Transfer Protocol (SMTP) and Network News Transfer Protocol (NNTP) transport event sinks with Microsoft® Collaboration Data Objects (CDO).
For the SMTP and NNTP event sources, you can set two optional properties for each binding:
With CDO, the ScriptName property in the Sink property bag is used with the CDO SMTP and NNTP event scripting hosts to specify the path to the file that contains script code for executing an event. For more information, see Implementing Sinks with Scripting Languages.
The following table displays an example binding of a set of registered event sinks.
SMTP OnArrival Event Source Bindings
ID | Display name | SinkClass | Source property bag |
---|---|---|---|
{GUID1} | Sink 11 | MySinks.MySink1 | Priority=150
Rule="mail from=*@microsoft.com" |
{GUID2} | Sink 12 | MySinks.MySink2 | Rule="EHLO=*microsoft.com" |
{GUID3} | Sink 13 | MySinks.MySink3 | Priority=30000
Rule="rcpt to=somename*;mail from=user1*" |
Note that Sink 12 has no priority value set. Sinks with no priority have the default value of 24575. For more information about creating and managing event sink and source bindings, see Managing Event Bindings.
The following table displays an example binding of an event sink written in a scripting language.
SMTP OnArrival Event Binding using a CDO Scripting Host
ID | Display Name | SinkClass | Source Property Bag | Sink Property Bag |
---|---|---|---|---|
{GUID4} | Script Sink | CDO.SS_SMTPOnArrivalSink | Priority = 300
Rule = "mail from=*" |
ScriptName="c:\scripts\mysmtpscript.vbs" |
In this case, the actual event sink is the CDO.SS_SMTPOnArrivalSink event scripting host Component Object Model (COM) class. The scripting host executes the script code in the file specified in the ScriptName property, which is located in the Sink property bag, for the particular event. For more information, see Implementing Sinks with Scripting Languages.