Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Non-graphical COM
#2
Macro
Code:
Copy      Help
IDispatch obApp
obApp._create("hMailServer.Application")
obApp.Authenticate("Administrator", "<administrator-password>")

IDispatch obDomain
obDomain = obApp.Domains.ItemByName("example.com")

or

Macro
Code:
Copy      Help
str vbcode=
;Dim obApp
;Set obApp = CreateObject("hMailServer.Application")
;' Authenticate. Without doing this, we won't have permission
;' to change any server settings or add any objects to the
;' installation.
;Call obApp.Authenticate("Administrator", "<administrator-password>")
;
;' Locate the domain we want to add the account to
;Dim obDomain
;Set obDomain = obApp.Domains.ItemByName("example.com")
;
;Dim obAccount

VbsExec vbcode


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)