I am trying to add a domain using the COM object but have got confused..
Dim obApp = CreateObject("hMailServer.Application")
obApp.Authenticate("1", "2")
Dim obDomain = obApp.Domains.Add("MyDomain.com") ??
obDomain.Active = True
obDomain.Save
How do I tell it what domain to add
Sorry for the doff question - just can't get my head around this one.
I need to do this so that I can add accounts later - and there has to be an active domain in order to add an account.
Add domain using COM
-
- New user
- Posts: 21
- Joined: 2007-04-26 12:19
- Location: South Africa
- Contact:
-
- New user
- Posts: 21
- Joined: 2007-04-26 12:19
- Location: South Africa
- Contact:
Solved
Amazing what a tea break will do ...
Dim obDomain = obApp.Domains.Add()
obDomain.Name = DOMAINNAME
obDomain.MaxMessageSize = 100 'max message size
obDomain.MaxSize = 1000 'max domain size
obDomain.Active = true ' turn it on
obDomain.Postmaster = "postmaster@" & DOMAINNAME
obDomain.Save
Dim obDomain = obApp.Domains.Add()
obDomain.Name = DOMAINNAME
obDomain.MaxMessageSize = 100 'max message size
obDomain.MaxSize = 1000 'max domain size
obDomain.Active = true ' turn it on
obDomain.Postmaster = "postmaster@" & DOMAINNAME
obDomain.Save