Platform SDK: CDO for Windows 2000 |
After you create an event binding, you can explicitly enable or disable it. When the binding is disabled, the event dispatcher ignores the binding. The syntax for enabling or disabling the event binding is as follows;
cscript [smtpreg | nntpreg].vbs /enable | /disable instance event display name
This example demonstrates how to create bindings and then disable them immediately.
cscript smtpreg.vbs /add 1 onarrival MyGeneralSink MyStuff.MySink "mail from=*" cscript smtpreg.vbs /disable 1 onarrival MyGeneralSink cscript nntpreg.vbs /add 1 onpost MyPostSink MyStuff.MySink2 "newsgroups=*" cscript nntpreg.vbs /disable 1 onpost MyPostSink
Then you can enable the bindings as follows:
cscript smtpreg.vbs /enable 1 onarrival MyGeneralSink cscript nntpreg.vbs /enable 1 onpost MyPostSink