Server API - Server Object Methods 1


Home>Product Description>Programmer API>Server API

Server API

Server Object Methods - 1 of 2

$GetVersion

Returns WebPublisher Server version.

Syntax

Do SERVER.$GetVersion() Returns cVersion

cVersion

character variable that receives the version.


$GetRootDir

Returns the path of the WebPublisher Studio Server directory.

Syntax

Do SERVER.$GetRootDir(cPath) Returns #F

cPath

character variable that receives the path.

#F

true if the path was retrieved, false if a file error occurred.


$GetLogDir

Returns the path of a directory in the server log directory with the same name as the calling Plug-in, creating the directory if necessary.

Syntax

Do code method wpserver.api/$LogDir($clib,cPath) Returns #F

cPath

character variable that receives the path.

#F

true if the path was retrieved, false if a file error occurred or a reserved name was used.

Notes

This is a convenience method for Plug-ins that produce log files, it is not used in any way by the server.


$QueMail

Places an email in the WebPublisher Studio Mail Queue. The WebPublisher Studio Mail Manager is used to setup the outgoing mail servers and the queue send frequency.

Syntax

Do SERVER.$QueMail($clib,cSndName,cSndAdr,cSubject,lTo,iType,cBody, [lCC,lBCC,iPriority]) Returns #F

cSndName

character - sender's name.

cSndAdr

character - sender's email address.

cSubject

character - mail subject.

lTo

list - single column list of receiver email addresses.

iType

short integer - content mime type - 0=text/plain, 1=text/html - if omitted defaults to 0.

cBody

character - the mail message body.

lCC

list - optional - single column list of CC email addresses.

lBCC

list - optional - single column list of BCC email addresses.

iPriority

short integer - optional - range 1 through 5 with 1 as the highest priority - if omitted defaults to 3.

#F

true if the operation succeeded, false if a mail error occurred.

Notes

Error messages will be posted to the WebPublisher Studio Mail Error Log.
©Corporate Windows Pty Limited 2012 Previous | Next