ServiceCollection object


Methods

ServiceStatus Set/Get service status.
ServiceSessions Get session count.
GetConnectionInfo Get current active connections.
TerminateConnection Terminate a specified session or connection.

Remarks

ServiceCollection object can be used to start/stop/monitor services of EmailArchitect Server. Only "system" account has the permission to access this object.

Usage Example

Dim server, user, password, requestAddr
server = "localhost"
user = "system"
password = "mypassword"
requestAddr = "192.168.0.1"

Dim oSvr
Set oSvr = CreateObject("EmailArchitectObjects.ServerRoot")
r = oSvr.Connect( server, user, password, 0, requestAddr )
If r <> 0 Then
  WScript.Echo( "connect server failed!" )
  WScript.Quit
End If

Dim oServices
Set oServices = oSvr.ServiceCollection

If oServices.ServiceStatus( "smtpd", 0 ) = 1 Then
  WScript.Echo( "SMTP service is running..." )
Else
  WScript.Echo( "SMTP service stopped" )
End If