Currently I achieve this using a batch file which uses net stop hMailServer and net start hMailServer. The problem with this is that all the statistics get reset every time.
Looking at the COM API docs there is a property of ServerState which may or may not be able to help with this, however when I try and use it to see what it gives me I get an error "You do not have access to this propert / method".
Here is the code I am trying:
Code: Select all
dim obApp set obApp = createObject("hMailServer.Application") msgBox "hMailServer state " & obApp.ServerState