how do you do this in vbs?

Use this forum if you have problems with a hMailServer script, such as hMailServer WebAdmin or code in an event handler.
Post Reply
User avatar
Pern
Normal user
Normal user
Posts: 46
Joined: 2006-09-07 21:14

how do you do this in vbs?

Post by Pern » 2006-09-13 20:53

i found this php code im trying to convert it to vbs for an idea i have

PHP CODE

Code: Select all

// Create the hMailServer Application COM object
$obBaseApp = new COM("hMailServer.Application");

// Uncomment the following line if you're using hMailServer 4.3
// $obBaseApp->Authenticate("administrator", "your password");

// Fetch the object that contains the hMailServer status
$obStatus = $obBaseApp->Status();

// Fetch variabes...
$upsince = $obStatus->StartTime();
$messagecount = $obStatus->ProcessedMessages();

echo "This server has processed $messagecount messages since it started at $upsince";

VB Snip

Code: Select all


  Set oApp = CreateObject("hMailServer.Application")
oApp.Authenticate = "Administrator,password" 

EventLog.Write("hMailServer Status.StartTime: " & oApp.Status.StartTime)
how do i do this in vbs.. any help???
thanks in advance for any help you may provide
Johnny - aka Pern
WebSite: dragonsworkshop.com ** Happy Holidays**

User avatar
martin
Developer
Developer
Posts: 6777
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Post by martin » 2006-09-13 23:45

Something like this

Code: Select all

set oApp = CreateObject("hMailServer.Application")

Call oApp.Authenticate("Administrator", "testar")
set oStatus = oApp.Status

upsince = oStatus.StartTime
messagecount = oStatus.ProcessedMessages

User avatar
Pern
Normal user
Normal user
Posts: 46
Joined: 2006-09-07 21:14

Post by Pern » 2006-09-14 01:22

thank you most kind of you

Post Reply