Page 1 of 1

Accessing API from another machine.

Posted: 2008-06-03 18:20
by robcha
I want to access the COM API from a different machine than where hmailserver is installed. By looking at the way the hMailserver Administrator connects to hMailServers, it leads me to believe that this is possible.

My instincts tell me that you would specify the hostname on the application.authenticate but alas there are no properties for hostname there. Am I missing something blatently or is this functionality not provided through the API.

Thanks,

Rob...

Re: Accessing API from another machine.

Posted: 2008-06-03 20:22
by SorenR

Re: Accessing API from another machine.

Posted: 2008-06-03 20:30
by robcha
Let me clarify. I want to use the COM API in a script running on a remote machine from the hMailServer machine.

Thanks,

Rob...

Re: Accessing API from another machine.

Posted: 2008-06-03 20:38
by martin
You create an instance of the hMailServer.Application in some way. It's when you do this you need to specify on which host the object is going to be created. How to do this depends on what development language you're using. I suggest you check the documentation for the COM object creation function you're using.

Re: Accessing API from another machine.

Posted: 2008-06-03 20:47
by robcha
OK that is the missing piece. I need to specify the hostname in the CreateObject statement

Code: Select all

Set objApp = CreateObject("hMailServer.Application", "remotehost")
Thanks a bunch!!!!

Rob...