Update the value of specified configuration items.
long PutItem( [in] BSTR bstrKey, [in] BSTR bstrVal, [in] long Update )
Parameters
bstrKey
Name of the configuration item to updated. All available items can be found in "C:\Program Files\EmailArchitect\conf\config.txt".
bstrVal
New value of the updated item.
Update
If this value is zero, the value of configuration item in server memory will be updated. Once server is restarted, the value will be lost. If this value is 1, the new value will also be saved to the configuration file and will never be lost.
Return Value
Return value is zero if this method succeeds; otherwise return value is non-zero.
Remarks
Value of configuration item can't contain line-break. However, you can use Chr(13) & Chr(10) & Chr(9) to split multiple line in configuration item value.
Usage Example
Dim server, user, password, requestAddr
server = "localhost"
user = "system"
password = "mypassword"
requestAddr = "192.168.0.1"
Dim oSvr
Set oSvr = CreateObject("EmailArchitectObjects.ServerRoot")
r = oSvr.Connect( server, user, password, 0, requestAddr )
If r <> 0 Then
  WScript.Echo( "connect server failed!" )
  WScript.Quit
End If
Dim oConfig
Set oConfig = oSvr.ServerConfig
'Change SMTP service port to 25.
oConfig.PutItem "smtpd/listenport", "25", 1 
		 
See Also