|
Dim objApi, objDomain, objAccounts
objApi = Server.CreateObject("MerakCOM.ApiObject")
objApi.Init("d:\merak")
objDomain = objApi.NewDomain("mydomain.com")
objDomain.Save()
Dim i
for i=0 to objApi.GetDomainCount()-1
Response.Write(objApi.GetDomain(i) & "<br>")
next
我使用上述代码产生了mydomain.com,且在代码中能够读出来,但通过merak Mail Server administrator 中看不到。
通过merak Mail Server administrator 创建的Domain又可以再objApi.GetDomain(i)显示出来。
objApi = Server.CreateObject("MerakCOM.ApiObject")
objApi.Init("d:\merak")
objDomain = objApi.NewDomain("mydomain.com")
objDomain.SetProperty("D_Description", "Description")
objDomain.SetProperty("D_AdminEmail", "postmaster@test.com")
objDomain.Save()
此外,当上述代码中红色部分屏蔽掉时域增加没问题,但但不屏蔽掉时,页面报出以下错误:
Server Error in '/' Application. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30800: Method arguments must be enclosed in parentheses.
[ 本帖最后由 nienianjun 于 2007-6-13 12:13 编辑 ] |
|