Register and Test the Sink
Register and Test the Sink
Finally, we register the sink and test it. Here is a simple WSH script written in VBScript to register and un-register the sink:
sub register()
set foo = createobject("ShieldsUp.Sink")
wscript.echo "Sink Binding GUID: " & _
foo.registersink( _
1, _
"ShieldsUp Sink", _
"{3CDE4573-9490-4c75-ACBE-B3A29FBC56BD}", _
"The service is down. Please Try Again.", _
True)
end sub
sub unregister()
set foo = createobject("ShieldsUp.Sink")
foo.unregistersink 1, "{3CDE4573-9490-4c75-ACBE-B3A29FBC56BD}"
end sub
To test the sink, try running telnet.exe and connecting to the SMTP service running on port 25. Then, just type "EHLO" and enter. The sink (if enabled) should echo the response and close the connection.