|
||||||||||||||||||||||||||||||||||||||||||||
|
Reference WorkgroupMail API The WorkgroupMail API provides programmatic control over some of the features in WorkgroupMail. Most of the objects and methods relate to the administration of WorkgroupMail, however there are also specific methods for creating and sending messages programmatically via WorkgroupMail. The WorkgroupMail API is made up of the following automation objects.
WMSessionWMSession is the object that represents a login session with WorkgroupMail. The caller must log on to a session, either as an administrator, or as a user, before being permitted to perform most other operations. The WMSession object is the only object that needs to be explicitly created. All other objects may be accessed from this object. The following code is an example of how to create a WMSession object in Visual Basic: Set session = CreateObject("WMAPI.WMSession") bSuccess = session.Login(“adminpassword”) Properties LocalPOP3LoginName Description: The local POP3 login name for the workgroup. This is the login name for an account which exposes all the messages held in WorkgroupMail for download. Type: String LocalPOP3Password Description: The local POP3 password for the workgroup. This is the password for an account which exposes all the messages held in WorkgroupMail for download. Type: String UnknownRedirectUser Description The WMUser object that unknown mail is forwarded to. Type: WMUser object WorkgroupName Description: The Company Name as entered with the keycode. This is used only to verify the keycode. Type: String Administrator Description: The WMUser object that is the administrator of the workgroup. This is the first user that was created when WorkgroupMail was installed. Type: WMUser object LogCommunications Description: Specifies whether or not all SMTP, POP3 and IMAP communications should be logged to a file. Type: Boolean LogFile Description: The full path and name of the file used to log all SMTP, POP3 and IMAP communications. Type: String ClientConnectionInterface Description: The interface that the POP3 server listens on, for client connections. It takes the form of an IP address in dot notation . It must match one of the local IP addresses of the computer, which runs WorkgroupMail. Type: String ServerConnectionInterface Description: The interface that the SMTP server listens on, for client connections (or other mail servers). It takes the form of an IP address in dot notation. It must match one of the local IP addresses of the computer, which runs WorkgroupMail. Type: String IMAPConnectionInterface Description: The interface that the IMAP server listens on, for client connections (or other mail servers). It takes the form of an IP address in dot notation. It must match one of the local IP addresses of the computer, which runs WorkgroupMail. Type: String PurgeEventLogPeriodically Description: Specifies if WorkgroupMail should periodically purge entries from the event log. This represents the corresponding UI settings in the Purging page of the Settings property sheet. Type: Boolean PurgeEventsAge Description: The age, in days, that event log entries need to be before they are purged. This represents the corresponding UI settings in the Purging page of the Settings property sheet. Type: Long Integer DontDownloadLargeMessages Description: Specifies if large messages are to be left on the server when downloading mail from ISPs. Represents the corresponding UI settings in the Advanced page of the Settings property sheet. Type: Boolean LargeMessageSize Description: The size, in bytes, of the largest message that may be downloaded. Represents the corresponding UI settings in the Advanced page of the Settings property sheet. Type: Long Integer OpenRelay Description: Sets or gets the open relay property of WorkgroupMail. Returns True if WorkgroupMail is configured as an open relay. Allows the caller to configure WorkgroupMail as an open relay. Type: Boolean RelayAuthenticated Description: Specifies if mail can be relayed using SMTP authentication. This option is ignored if OpenRelay is true. If this property is true then, if the local sender has authenticated themselves, using SMTP authentication, they will automatically be permitted to relay mail to addresses outside the domain. Type: Boolean AQLimitStoredMessages Description: A boolean that specifies if a default limit will be imposed on the maximum number of messages allowed in a user account mailbox. User account quotas will override this setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Quotas page of the Settings property sheet. Type: Boolean AQStoredMessageLimit Description: The default account quota for the maximum number of messages that can be stored in a user account mailbox. Dependant on AQLimtStoredMessages being true. User account quotas will override this setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Quotas page of the Settings property sheet. Type: Long Integer AQLimitStorageSize Description: A global boolean setting that specifies if a limit will be imposed on the maximum amount of disk space that can be occupied by messages in a user account mailbox. User account quotas will override this setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Quotas page of the Settings property sheet. Type: Boolean AQStorageSizeLimit Description: The default account quota, in KB, for the maximum amount of disk space that can be occupied by messages in a user account mailbox. Dependant on AQLimtStorageSize being true. User account quotas will override this setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Quotas page of the Settings property sheet. Type: Long Integer APAutoDeleteInactiveAccount Description: A global boolean setting that specifies if inactive accounts will be deleted automatically. Specific user account pruning will override this setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Pruning page of the Settings property sheet. Type: Boolean APInactiveDays Description: The default number of days that an account has to be inactive before it is automatically deleted . Dependent on APAutoDeleteInactiveAccount being true. Specific user account pruning will override this setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Pruning page of the Settings property sheet. Type: Long Integer APDeleteInboxMessages Description: A global boolean setting that specifies if old messages in the inbox will be purged. The Inbox is where WorkgroupMail initially delivers new messages for a particular user. Specific user account pruning will override this setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Pruning page of the Settings property sheet. Type: Boolean APDeleteInboxMessageDays Description: The default number of days old that a message must be before it is automatically purged from the Inbox. Dependent on APDeleteInboxMessages being true. Specific user account pruning will override this setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Pruning page of the Settings property sheet. Type: Long Integer APDeletePersonalFolderMessages Description: A global boolean setting that specifies if old messages in any personal folders will be purged. Personal folders are folders that are created in WebMail or using an IMAP client. Specific user account pruning will override this setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Pruning page of the Settings property sheet. Type: Boolean APDeletePFMessageDays Description: The default number of days old that a message must be before it is automatically purged from any personal folder. Dependent on APDeleteInboxMessages being true. Specific user account pruning will override this setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Pruning page of the Settings property sheet. Type: Long Integer APDeleteDeletedMessages Description: A global boolean setting that specifies if deleted messages will be purged. Deleted messages are messages that exist in the Deleted Items folder. Specific user account pruning will override this setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Pruning page of the Settings property sheet. Type: Boolean APDeleteDeletedMessageDays Description: The default number of days old that a deleted message must be before it is automatically purged from an account. Dependent on APDeleteDeletedMessages being true. Specific user account pruning will override this setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Pruning page of the Settings property sheet. Type: Long Integer ARCanUseWebMail Description: A global boolean setting that specifies whether or not a user can use WebMail. Specific user account restrictions will override this setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Restrictions page of the Settings property sheet. Type: Boolean ARCanUseIMAP Description: A global boolean setting that specifies whether or not a user can use IMAP. Specific user account restrictions will override this setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Restrictions page of the Settings property sheet. Type: Boolean ARCanSendExternalMessages Description: A global boolean setting that specifies whether or not a user can send external mail. If false, the exceptions list will prevail. Specific user account restrictions will override this setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Restrictions page of the Settings property sheet. Type: Boolean ARCanReceiveExternalMessages Description: A global boolean setting that specifies whether or not a user can receive external mail. If false, the exceptions list will prevail. Specific user account restrictions will override this setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Restrictions page of the Settings property sheet. Type: Boolean SpamFilterType Description: Specifies the action to perform on detection of a spam message. This corresponds to the user interface in the Settings page of the Spam Filtering property sheet. The following values are valid. 0. Do nothing 1. Filter spam and place in specified quarantine 2. Filter spam and delete/reject messages. 3. Add a header to the message for subsequent detection in the content filter (if appropriate). Type: Short integer SpamFilterDefaultMessageType Description: Sets or gets how WorkgroupMail should treat messages in terms of spam mail. The following values are valid. 0. No junk mail filtering 1. Treat all mail as junk mail except for white list. 2. Treat all mail as non-junk unless specifically identified as such by the black list, the spam servers or SpamCleanser. Type: Short integer SpamQuarantine Description: Sets or gets the quarantine area that is used to hold messages that are detected as spam messages. Type: WMQuarantineArea object SMTPServerPort Description: Sets or gets the port used for listening for incoming SMTP connections. This corresponds to the user interface in the Advanced page of the Settings property sheet. Type: Short integer POP3ServerPort Description: Sets or gets the port used for listening for incoming POP3 connections. This corresponds to the user interface in the Advanced page of the Settings property sheet. Type: Short integer IMAPServerPort Description: Sets or gets the port used for listening for incoming IMAP connections. This corresponds to the user interface in the Advanced page of the Settings property sheet. Type: Short integer DefaultOutOfOfficeReply Description: Sets or gets the global out of office reply. This setting can be overridden on a per-user basis. Type: String Methods Login Description: Logs into the WorkgroupMail session. Most operations cannot be performed unless this function has successfully been called. The administrator password may be changed once successfully logged in. Syntax: Login (sPassword as string) Parameters: sPassword is the administrator password. Return type: Boolean Example: bLoggedIn = session.Login("AdminPwd") Logout Description: Log out of the WorkgroupMail session. Syntax: Logout() Parameters: None Return type: None SetAdministratorPassword Description: Set the administrator password. You must be logged in for this method to work. Syntax: SetAdministratorPassword (sNewPassword as string) Parameters: sNewPassword is the new password string. Return type: Boolean indicating if the call was successful. If not logged into the session then false will be returned. Reload Description: Reloads the WorkgroupMail data which will update the data stored in the API's memory. This function can be used when a change to the data has been made by another instance of the API or the WorkgroupMail administrator. Syntax: Reload() Parameters: None Return type: Boolean indicating success or failure. AddUser Description: Adds a user with the given name to the WorkgroupMail list of users. You must be logged in for this method to work. Syntax: AddUser(sName as string) Parameters: sName is the string that specifies the name of the user to be added. Return type: WMUser object that is the user added. Returns nothing if an error occurs such as not logged into the session. Example: set user = session.AddUser("Paul Kennedy") GetFirstUser Description: Gets the first user in the list of WorkgroupMail users. You must be logged in for this method to work. Syntax: GetFirstUser() Parameters: None Return type: WMUser object of the first user. Returns nothing if not logged into the session. GetNextUser Description: Get the next user in the list of WorkgroupMail users after the user passed into this method. Returns nothing if the user passed in is nothing or the last user You must be logged in for this method to work. Syntax: GetNextUser(user as object) Parameters: user is a WMUser object returned by a previous call to GetFirstUser() or GetNextUser(). Return type: WMUser object of the next user. Returns nothing if there is no next user. DeleteUser Description: Delete the given user from the list of WorkgroupMail users. You must be logged in for this method to work. Syntax: DeleteUser(user as object) Parameters: user is a WMUser object returned by a previous method call. Return type: Boolean indicating if the delete was successful or not. AddISP Description: Add a new ISP to WorkgroupMail with the given name You must be logged in for this method to work. Syntax: AddISP(sName as string) Parameters: sName is a string specifying the name of the new ISP. Return type: WMISP object which is the newly added ISP. GetFirstISP Description: Gets the first ISP in the list of WorkgroupMail ISPs. You must be logged in for this method to work. Syntax: GetFirstISP() Parameters: None Return type: WMISP object of the first ISP. Returns nothing if not logged into the session. GetNextISP Description: Get the next ISP in the list of WorkgroupMail ISPs after the ISP passed into this method. Returns nothing if the ISP passed in is nothing or the last ISP. You must be logged in for this method to work. Syntax: GetNextISP (isp as object) Parameters: isp is a WMISP object returned by a previous call to GetFirstISP() or GetNextISP(). Return type: WMISP object of the next ISP. Returns nothing if there is no next ISP. DeleteISP Description: Delete the given ISP from the list of WorkgroupMail ISPs You must be logged in for this method to work.. Syntax: DeleteISP(isp as object) Parameters: isp is a WMISP object returned by a previous method call. Return type: Boolean indicating success or failure. AddVirtualMailbox Description: Add a new virtual mailbox to WorkgroupMail with the given name. You must be logged in for this method to work. Syntax: AddVirtualMailbox(sName as string) Parameters: sName is the string specifying the name of the new virtual mailbox. Return type: WMVirtualMailbox object which is the newly added virtual mailbox. GetFirstVirtualMailbox Description: Gets the first virtual mailbox in the list of WorkgroupMail virtual mailboxes. You must be logged in for this method to work. Syntax: GetFirstVirtualMailbox() Parameters: None Return type: WMVirtualMailbox object of the first virtual mailbox. Returns nothing if not logged into the session. GetNextVirtualMailbox Description: Get the next virtual mailbox in the list of WorkgroupMail virtual mailboxes after the virtual mailbox passed into this method. Returns nothing if the virtual mailbox passed in is nothing or the last virtual mailbox. You must be logged in for this method to work. Syntax: GetNextVirtualMailbox(vmb as object) Parameters: vmb is a WMVirtualMailbox object returned by a previous call to GetFirstVirtualMailbox() or GetNextVirtualMailbox(). Return type: WMVirtualMailbox object of the next virtual mailbox. Returns nothing if there is no next virtual mailbox. DeleteVirtualMailbox Description: Delete the given virtual mailbox from the list of WorkgroupMail virtual mailboxes. You must be logged in for this method to work. Syntax: DeleteVirtualMailbox(vmb as object) Parameters: vmb is the WMVirtualMailbox object to be deleted. Return type: Boolean indicating success or failure. AddJunkMailEntry Description: Adds a mail address to the black list of junk mail addresses. You must be logged in for this method to work. Syntax: AddJunkMailEntry(sJunkMailAddress as string) Parameters: sJunkMailAddress is a string which is a junk mail address. Return type: Boolean indicating success or failure. GetFirstJunkMailEntry Description: Gets the first junk mail address in the black list. You must be logged in for this method to work. Syntax: GetFirstJunkMailEntry() Parameters: None Return type: String which is the first junk mail address. GetNextJunkMailEntry Description: Gets the next junk mail address after the junk mail address passed in. You must be logged in for this method to work. Syntax: GetNextJunkMailEntry(sJunkMailAddress as string) Parameters: sJunkMailAddress is a junk mail address string which is got from a previous call to GetFirstJunkMailEntry() or GetNextJunkMailEntry(). Return type: String which is the next junk mail address. DeleteJunkMailEntry Description: Deletes the junk mail address passed in. You must be logged in for this method to work. Syntax: DeleteJunkMailEntry(sJunkMailAddress as string) Parameters: sJunkMailAddress is the junk mail address string to be deleted. Return type: Boolean indicating success or failure. DisableSave Description: Disables saving changes to the WorkgroupMail data store. To enable changes to be saved you must call EnableSave() some time after this method call. This function might be called if a lot of changes are to be made so they can be made quickly without updating the data store and then the data store is updated when EnableSave() is called. Syntax: DisableSave() Parameters: None Return type: None EnableSave Description: Enables saving changes to the WorkgroupMail data store. If changes were made that have not been saved to the data store then this function will save those changes. Syntax: EnableSave() Parameters: None Return type: Boolean indicating success or failure. GetUserByID Description: Gets the WMUser object with the ID passed in. You must be logged in for this method to work. Syntax: GetUserByID(lID as long) Parameters: lID is a Long Integer specifying the ID of the user to be returned. Return type: WMUser object with the ID passed in. Returns nothing if the user cannot be found with the given ID. GetVirtualMailboxByID Description: Gets the virtual mailbox object with the ID passed in. You must be logged in for this method to work. Syntax: GetVirtualMailboxByID(lID as long) Parameters: lID is the Long Integer specifying the ID of the virtual mailbox to be returned. Return type: WMVirtualMailbox object with the ID passed in. Returns nothing if the virtual mailbox cannot be found with the given ID. GetISPByID Description: Gets the ISP object with the ID passed in. You must be logged in for this method to work. Syntax: GetISPByID(lID as long) Parameters: lID is the Long Integer specifying the ID of the ISP to be returned. Return type: WMISP object with the ID passed in. Returns nothing if the ISP cannot be found with the given ID. GetSentMessages Description: Gets a list object which contains a snapshot of all sent messages at the time of the method call. Syntax: GetSentMessages() Parameters: None Return type: WMMessageList object containing a snapshot of the sent messages. GetReceivedMessages Description: Gets a list object which contains a snapshot of all received messages at the time of the method call. Syntax: GetReceivedMessages() Parameters: None Return type: WMMessageList object contains a snapshot of the received messages. NewMessage Description: Create a new WMComposeMessage object to send a mail message. Syntax: NewMessage() Parameters: None Return type: WMComposeMessage object used to send a message AddGroup Description: Create a new user group object with the passed in name. Syntax: AddGroup(sName) Parameters: sName is a string specifying the name of the new group Return type: WMGroup object GetFirstGroup Description: Gets the first group in the list of WorkgroupMail groups. You must be logged in for this method to work. Syntax: GetFirstGroup() Parameters: None Return type: WMGroup object of the first group. Returns nothing if not logged into the session. GetNextGroup Description: Get the next group in the list of WorkgroupMail groups after the group passed into this method. Returns nothing if the group passed in is nothing or is the last group. You must be logged in for this method to work. Syntax: GetNextGroup (group as object) Parameters: group is a WMGroup object returned by a previous call to GetFirstGroup() or GetNextGroup(). Return type: WMGroup object of the next group. Returns nothing if there is no next group. DeleteGroup Description: Delete the given group from the list of WorkgroupMail groups. You must be logged in for this method to work. Syntax: DeleteGroup(group as object) Parameters: group is a WMGroup object returned by a previous method call. Return type: Boolean indicating success or failure. LoggedIn Description: Returns the current WorkgroupMail login state as determined by Login and Logout functions Syntax: LoggedIn() Parameters: None Return type: Boolean indicating true or false. GetLastErrorString Description: Returns the last error string returned produced by a function call Syntax: GetLastErrorString() Parameters: None Return type: String which is the last error string text. GetMessageFromFilename Description: Returns a message object from a message file. The message file must contain a MIME formatted message. Syntax: GetMessageFromFilename(sFilename as string) Parameters: sFilename is a string specifying the message filename Return type: WMMessage object LoginUser Description: Logs into a WorkgroupMail user account Syntax: Login(sUserAccount sUserPwd) Parameters: sUserAccount and sUserPwd are string variables specifying the users’ account name and password Return type: WMUser object. CreateSubFolder Description: Creates a sub folder under the WorkgroupMail installation folder. Nested sub-folders can be created by use of the backslash character. Syntax: CreateSubFolder(sFolderName) Parameters: sFolderName is a string variable representing the sub folders name Return type: Boolean indicating success or failure. Example: CreateSubFolder(“Logs\Archive”). This will create the folder Archive under the folder Logs. If Logs does not exist then this will be created also. DeleteSubFolder Description: Deletes a sub folder under the WorkgroupMail installation folder. Nested sub-folders can be deleted by use of the backslash character. Syntax: DeleteSubFolder(sFolderName) Parameters: sFolderName is a string variable specifying the name of the sub folder Return type: Boolean indicating success or failure. Example: DeleteSubFolder(“Logs\Archive”) This will Delete the folder Archive under the folder Logs AddPublicFolder Description: Creates a public message folder Syntax: AddPublicFolder(sFolderName) Parameters: sFolderName is a string variable specifying the name of the public folder Return type: Object of type WMPublicFolder. Example: Set PubFold = session. AddPublicFolder(“SalesOrders”) GetFirstPublicFolder Description: Returns the details of the first listed public folder Syntax: GetFirstPublicFolder() Parameters: None Return type: Object of type WMPublicFolder. GetNextPublicFolder Description: Returns the details of the next listed public folder Syntax: GetNextPublicFolder(PublicFolder as object) Parameters: PublicFolder is an object of type WMPublicFolder. It represents the public folder preceding the one required in the public folder list. Return type: Object of type WMPublicFolder. DeletePublicFolder Description: Deletes the specified Public folder Syntax: DeletePublicFolder(PublicFolder) Parameters: PublicFolder is an object of type WMPublicFolder. It represents the public folder to be deleted. Return type: Boolean indicating success or failure. GetPublicFolderByID Description: Returns details of the public folder specified by its public folder ID Syntax: GetPublicFolderByID(ID as long) Parameters: ID is a long integer specifying the ID Return type: Object of type WMPublicFolder. GetGroupByID Description: Returns details of the group specified by its group ID. Syntax: GetGroupBy(ID as long) Parameters: ID is a long integer representing the ID Return type: Object of type WMGroup. AddQuarantineArea Description: Adds a new quarantine area. Syntax: AddQuarantineArea(sQuarantine as string) Parameters: sQuarantine is a string specifying the name of the new quarantine area Return type: Object of type WMQuarantineArea. GetFirstQuarantineArea Description: Returns the details of the first listed quarantine area. Syntax: GetFirstQuarantineArea() Parameters: None Return type: Object of type WMQuarantineArea. GetNextQuarantineArea Description: Returns details of the next listed quarantine area. Syntax: GetNextQuarantineArea(QuarantineArea as object) Parameters: QuarantineArea is an object of type WMQuarantineArea and is the quarantine area listed before the one required. Return type: Object of type WMQuarantineArea. DeleteQuarantineArea Description: Deletes the specified quarantine area. Syntax: DeleteQuarantineArea(QuarantineArea as object) Parameters: QuarantineArea is an object of type WMQuarantineArea and is the quarantine area to be deleted. Return type: Boolean indicating success or failure. GetQuarantineAreaByID Description: Returns details of the quarantine area as specified by its quarantine area ID. Syntax: GetQuarantineAreaByID(ID as long) Parameters: ID is a long integer specifying the ID of the quarantine area required. Return type: Object of type WMQuarantineArea. AddTrustedHostDomain Description: Adds a new Trusted Host domain Syntax: AddTrustedHostDomain(sDomain as string) Parameters: sDomain is a string specifying the domain name of the new Trusted Host Return type: Object of type WMAddressOrRange . AddTrustedHostSingle Description: Adds a new Trusted Host by IP address Syntax: AddTrustedHostSingle(lIP as long) Parameters: lIP is a long integer representing the IP address of the new Trusted Host. The long integer consists of four bytes. The high order byte represents the left hand side of the IP address in dot notation and the low order byte represents the right most part of the IP address Return type: Object of type WMAddressOrRange. Example: The IP address 192.168.0.25 could be represented by C0 A8 00 19 Hex or 3232235545 in long integer (decimal) format AddTrustedHostRange Description: Adds a new range of Trusted Hosts by IP address Syntax: AddTrustedHostRange(lIPstart as long lIPend as long) Parameters: lIPstart and lIPend are long integers specifying the start and end IP address of the new Trusted Host range. Each long integer consists of four bytes. The high order byte represents the left hand side of the IP address in dot notation and the low order byte represents the right most part of the Ip address Return type: Object of type WMAddressOrRange. Example: The IP address 192.168.0.25 could be represented by C0 A8 00 19 Hex or 3232235545 in long integer (decimal) format DeleteTrustedHost Description: Deletes a Trusted Host Syntax: DeleteTrustedHost(Host as object) Parameters: Host is the object of type WMAddressOrRange. Return type: Boolean indicating success or failure. GetFirstTrustedHost Description: Returns the first Trusted Host listed in WorkgroupMail Syntax: GetFirstTrustedHost() Parameters: None Return type: Object of type WMAddressOrRange. GetNextTrustedHost Description: Returns the next Trusted Host listed in WorkgroupMail Syntax: GetNextTrustedHost(TrustedHost as object) Parameters: TrustedHost is an object of type WMAddressOrRange and is the Trusted Domain listed before the one required. Return type: Object of type WMAddressOrRange. AddDomain Description: Adds a new Domain Syntax: AddDomain(sDomain as string) Parameters: sDomain is a string specifying the name of the new domain Return type: Object of type WMAddressOrRange. GetFirstDomain Description: Returns the details of the first listed Domain Syntax: GetFirstDomain() Parameters: None Return type: Object of type WMAddressOrRange. GetNextDomain Description: Returns the details of the next listed Domain Syntax: GetFirstDomain(Domain as object) Parameters: Domain is an object of type WMAddressOrRange and is the Domain listed before the one required. Return type: Object of type WMAddressOrRange. DeleteDomain Description: Deletes the specified Domain Syntax: DeleteDomain() Parameters: Object of type WMAddressOrRange Return type: Boolean indicating success or failure. FindTrustedHostByDescription Description: Identifies a Trusted Host by a search string Syntax: FindTrustedHostByDescription(sHost as string) Parameters: sHost is a string used to identify the Trusted Host Return type: Object of type WMAddressOrRange ARGetFirstSendException Description: Returns the first ‘send exception’ listed in the default account settings for when a user is not allowed to send mail to the outside world, except to … Syntax: ARGetFirstSendException() Parameters: None Return type: String specifying the first send exception e-mail address. ARGetNextSendException Description: Returns the next ‘send exception’ listed in the default account settings for when a user is not allowed to send mail to the outside world, except to … Syntax: ARGetNextSendException(sEmailAddr as string) Parameters: sEmailAddr is a string variable specifying the current send exception e-mail address Return type: String specifying the next send exception e-mail address. ARGetFirstReceiveException Description: Returns the first ‘receive exception’ listed in the default account settings for when a user is not allowed to receive mail from the outside world, except from … Syntax: ARGetFirstReceiveException() Parameters: None Return type: String specifying the first receive exception e-mail address. ARGetNextReceiveException Description: Returns the next ‘receive exception’ listed in the default account settings for when a user is not allowed to receive mail from the outside world, except from … Syntax: ARGetNextReceiveException(sEmailAddr as string) Parameters: sEmailAddr is a string variable specifying the current receive exception e-mail address Return type: String specifying the next receive exception e-mail address. ARAddSendException Description: Adds a new Send exception address to the list Syntax: ARAddSendException(sSendAddr as string) Parameters: sSendAddr is a string variable specifying the new send exception e-mail address. Return type: Boolean indicating success or failure. ARAddReceiveException Description: Adds a new Receive exception address to the list Syntax: ARAddReceiveException(sReceiveAddr as string) Parameters: sReceiveAddr is a string variable specifying the new receive exception e-mail address. Return type: Boolean indicating success or failure. ARDeleteSendException Description: Deletes the Send exception address specified in the string parameter Syntax: ARDeleteSendException(sSendAddr as string) Parameters: sSendAddr is a string variable specifying the send exception address to be deleted Return type: Boolean indicating success or failure. ARDeleteReceiveException Description: Deletes the Receive exception address specified in the string parameter Syntax: ARDeleteReceiveException(sReceiveAddr as string) Parameters: sReceiveAddr is a string variable specifying the receive exception address to be deleted Return type: Boolean indicating success or failure. AddSpamServer Description: Adds a new Spam Server Syntax: AddSpamServer (sSpamServer as string) Parameters: sSpamServer is a string specifying the name of the new spam server to be listed Return type: Object of type WMSpamServer. GetFirstSpamServer Description: Returns the details of the first listed Spam Server Syntax: GetFirstSpamServer() Parameters: None Return type: Object of type WMSpamServer. GetNextSpamServer Description: Returns details of the next listed Spam Server Syntax: GetNextSpamServer(SpamServer as object) Parameters: SpamServer is an object of type WMSpamServer which specifies the current Spam Server Return type: Object of type WMSpamServer which specifies the next listed Spam Server DeleteSpamServer Description: Deletes the specified Spam Server Syntax: DeleteSpamServer(SpamServer as object) Parameters: SpamServer is an object of type WMSpamServer which represents the Spam Server to be deleted. Return type: Boolean indicating success or failure. GetSpamServerByID Description: Returns details of the Spam Server as specified by its Spam Server ID Syntax: GetSpamServerByID(ID as long) Parameters: ID is a long integer representing the ID of the required Spam Server Return type: Object of type WMSpamServer. WMDomain_ The WMDomain_ object provides properties and methods to interrogate and edit domain details. Various methods and properties of the WMSession object and other objects return a WMDomain_ object and take WMDomain_ objects as arguments. Properties UnKnownRedirectUser Description: The user account that receives all messages for unknown users that are received for this domain. Type: Object of type WMUser RejectUnknown Description: Specifies whether or not mail for unknown recipients is rejected when receiving via SMTP. Type: Boolean RelayUnknown Description: Specifies if mail for unknown users can be relayed. If true and the recipient address has an entry in the routing table then the message will be relayed. Type: Boolean SendISP Description: If the send method for this domain is via an ISP then this property should be configured with the details of the sending ISP. If the send method is ‘Direct’ then this item will contain nothing. Type: Object of type WMISP RelayUnknownAlways Description: Sets or gets whether messages sent to an unknown mailbox at the domain will be relayed (redirected) to the Outgoing queue. This corresponds to the user interface in the Unknown Recipients page of the Domain property sheet. Type: Object of type WMISP MethodsAddDomain Description: Creates a domain name entry Syntax: AddDomain (sDomain as string) Parameters: sDomain is a string representing the new domain name. Return type: Boolean indicating success or failure. GetFirstDomain Description: Returns the first listed domain Syntax: GetFirstDomain () Parameters: None. Return type: String specifying the name of the domain GetNextDomain Description: Returns the next listed domain Syntax: GetNextDomain (sDomain as string) Parameters: sDomain is a string representing the current domain name. Return type: String specifying the name of the next domain DeleteDomain Description: Deletes the specified domain Syntax: DeleteDomain (sDomain as string) Parameters: sDomain is a string representing the domain to be deleted. Return type: Boolean indicating success or failure. GetID Description: Returns the ID of the current domain Syntax: GetID () Parameters: None Return type: Long integer specifying the ID of the current domain GetSendDirect Description: Returns flag specifying if the domain is configured to send direct Syntax: GetSendDirect() Parameters: None Return type: Boolean indicating if send direct is selected SetSendDirect Description: Sets the flag which specifies that the domain is configured to send direct Syntax: SetSendDirect() Parameters: None Return type: None WMGroup The WMGroup object encapsulates a WorkgroupMail local user and provides properties and methods to interrogate and edit user details. Various methods and properties of the WMSession object and other objects return a WMGroup object and take WMGroup objects as arguments. PropertiesName Description: The name of the group. Type: String Methods AddUser Description: Adds a user to the listing of a group Syntax: AddUser (Member as object) Parameters: Member is an object of type WMUser. Return type: Boolean indicating success or failure GetFirstUser Description: Returns the first user listed in the group Syntax: GetFirstUser () Parameters: None. Return type: Object of type WMUser specifying the first user listed in the group GetNextUser Description: Returns the next user listed in the group Syntax: GetNextUser (Member as object) Parameters: Member is an object of type WMUser. Return type: Object of type WMUser specifying the next user listed in the group RemoveUser Description: Removes a user from the listing of a group Syntax: RemoveUser (Member as object) Parameters: Member is an object of type WMUser. Return type: Boolean indicating success or failure GetID Description: Adds a user to the listing of a group Syntax: GetID () Parameters: None. Return type: Long integer specifying the ID of the current WorkgroupMail Group WMISP The WMISP object encapsulates a WorkgroupMail ISP and provides properties and methods to interrogate and edit ISPs details. Various methods and properties of the WMSession object and other objects return a WMISP object and take WMISP objects as arguments. Properties Name Description: This property allows the user to get and set the name of the WMISP object. This is the name that is displayed in the WorkgroupMail administrator. Type: String Enabled Description: The Enabled property allows the user to get and set if a WMISP object is enabled or disabled. Type: Boolean SMTPReceive Description: Allows the user to get and set whether this ISP receives mail via SMTP. Type: Boolean indicating if SMTP receive is enabled SendServerAddress Description: Allows the user to get and set the address of the ISPs send (SMTP) server. Type: String. Eg “216.54.12.9” or “mail.isp.net” ReceiveServerAddress Description: Allows the user to get and set the address of the ISP's receive (POP3) server. Type: String. Eg “216.54.12.9” or “mail.isp.net” UseModem Description: Allows the user to get and set if this ISP is connected to the internet via a modem (as opposed to a permanent connection). Type: Boolean DialUpService Description: Allows the user to get and set the dial-up service for the ISP if it is connected via a modem. Type: String equating to the name of the dial up service. ConnectOnStartup Description: Allows the user to get and set if this ISP is makes a connection on startup of the WorkgroupMail service. Type: Boolean. StartupConnectDelay Description: Specifies the number of seconds to wait before connecting to the ISP on startup. Type: Long Integer specifying the number of seconds’ delay. ConnectWhenQueueFull Description: Allows the user to get and set if the WorkgroupMail service is to connect to this ISP when there are a certain number of sent messages pending. The number of messages pending is defined in QueueFullSize Type: Boolean. QueueFullSize Description: Specifies the maximum number of messages allowed in the Sent Messages queue before the WorkgroupMail service will connect to the ISP. Type: Long Integer representing the maximum number of messages.. ConnectWhenMessagesWaiting Description: Allows the user to get and set if the WorkgroupMail service is to connect to this ISP if sent messages have been waiting for a set period of time. The waiting time for messages is defined in MessageWaitTime Type: Boolean. MessageWaitTime Description: Specifies the maximum time a message will wait before the WorkgroupMail service will connect to the ISP. Type: Long Integer specifying the time in minutes ConnectFrequently Description: Allows the user to get and set whether the WorkgroupMail service connects to the ISP on a schedule. The frequency of the connection is defined in ConnectFrequency. Type: Boolean ConnectFrequency Description: Specifies the scheduled connection interval. Type: Long Integer representing interval in minutes POP3DetailsActive Description: Allows the user to get and set whether this ISP receives via POP3. Type: Boolean POP3LoginName Description: Allows the user to get and set the multiple user POP3 account username for this ISP Type: String POP3Password Description: Allows the user to get and set the multiple user POP3 account password for this ISP Type: String LeaveMessagesOnServer Description: Allows the user to get and set if downloaded message are to be left on the server for this ISP. Type: Boolean DeleteOldMessagesFromServer Description: Allows the user to get and set if old messages are to be deleted from the server. Type: Boolean ServerDeleteMessageAge Description: Allows the user to get and set the age at which old messages on the server are deleted, in days. Type: Long Integer UnknownRedirectUser Description: Specifies the user account that will receive messages that don’t match the e-mail address of any user mailbox Type: Object of type WMUser OwnsDomains Description: This method is not valid for version 7. It applies to version 6 only. Type: Boolean Methods AddDomain Description: Adds a domain to the ISP. Syntax: AddDomain(string sDomain) Parameters: sDomain is the name of the domain to be added. Return type: Boolean indicating success or failure. GetFirstDomain Description: Gets the first domain listed for the ISP. Syntax: GetFirstDomain() Parameters: None Return type: String containing the first domain of the ISP. GetNextDomain Description: Gets the next domain listed for the ISP Syntax: GetNextDomain(sDomain as string) Parameters: sDomain is a string specifying the current domain as returned from a previous call to GetFirstDomain() or GetNextDomain(). Return type: String containing the next domain of the ISP. DeleteDomain Description: Deletes the specified domain from the ISP. Syntax: DeleteDomain(sDomain as string) Parameters: sDomain is the domain to be deleted. Return type: Boolean indicating success or failure. GetConnectionSchedule Description: Gets the connection schedule for the ISP. Syntax: GetConnectionSchedule() Parameters: None Return type: Object of type WMSchedule representing the connection schedule for the ISP. GetID Description: Get the ID of the current ISP, a number which uniquely identifies the ISP. Syntax: GetID() Parameters: None Return type: Long Integer. GetFirstProperty Description: Get the first property from the list of properties for the current ISP. Syntax: GetFirstProperty() Parameters: None Return type: Object of type WMProperty. GetNextProperty Description: Get the next property from the list of properties for the current ISP. Syntax: GetNextProperty(property as object) Parameters: property is a WMProperty object specifying the current property. Return type: WMProperty object containing the next property. WMUser The WMUser object encapsulates a WorkgroupMail local user and provides properties and methods to interrogate and edit user details. Various methods and properties of the WMSession object and other objects return a WMUser object and take WMUser objects as arguments. Properties Name Description: This property allows the user to get and set the name of the WMUser object. Type: String Enabled Description: The Enabled property allows the user to get and set if a WMUser object is enabled or disabled. Type: Boolean LocalPOP3LoginName Description: Gets or sets the local account name for this user. The local account name forms part of the credentials for logging a user onto the local POP3 server, the local IMAP server or WebMail. Type: String LocalPOP3Password Description: Gets or sets the local account password for this user. The local account password forms part of the credentials for logging a user onto the local POP3 server, the local IMAP server or WebMail. Type: String UseDefaultQuotaSettings Description: Gets or sets whether or not this user will use or override the default account quota settings that are globally defined. Type: Boolean UseDefaultAcntPruningSettings Description: Gets or sets whether or not this user will use or override the default account pruning settings that are globally defined. Type: Boolean UseDefaultRestrictionSettings Description: Gets or sets whether or not this user will use or override the default account restriction settings that are globally defined. Type: Boolean AQLimitStoredMessages Description: A boolean that specifies if a limit will be imposed on the maximum number of messages allowed this user’s account mailbox. This setting overrides the global equivalent setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Quotas page of the User property sheet. Type: Boolean AQStoredMessageLimit Description: The account quota for the maximum number of messages that can be stored in this user’s account mailbox. Dependent on AQLimtStoredMessages being true. This setting overrides the global equivalent setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Quotas page of the User property sheet. Type: Long Integer AQLimitStorageSize Description: A boolean setting that specifies if a limit will be imposed on the maximum amount of disk space that can be occupied by messages in this user’s account mailbox. This setting overrides the global equivalent setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Quotas page of the User property sheet. Type: Boolean AQStorageSizeLimit Description: The account quota, in KB, for the maximum amount of disk space that can be occupied by messages in this user’s account mailbox. Dependent on AQLimtStorageSize being true. This setting overrides the global equivalent setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Quotas page of the User property sheet. Type: Long Integer APAutoDeleteInactiveAccount Description: A boolean setting that specifies if inactive accounts will be deleted automatically. This setting overrides the global equivalent setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Pruning page of the User property sheet. Type: Boolean APInactiveDays Description: The number of days that an account has to be inactive before it is automatically deleted . Dependent on APAutoDeleteInactiveAccount being true. This setting overrides the global equivalent setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Pruning page of the User property sheet. Type: Long Integer APDeleteInboxMessages Description: A boolean setting that specifies if old messages in this user’s inbox will be purged. The Inbox is where WorkgroupMail initially delivers new messages for a particular user. This setting overrides the global equivalent setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Pruning page of the User property sheet. Type: Boolean APDeleteInboxMessageDays Description: The default number of days old that a message must be before it is automatically purged from this user’s Inbox. Dependent on APDeleteInboxMessages being true. This setting overrides the global equivalent setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Pruning page of the User property sheet. Type: Long Integer APDeletePersonalFolderMessages Description: A boolean setting that specifies if old messages in any of this user’s personal folders will be purged. Personal folders are folders that are created in WebMail or using an IMAP client. This setting overrides the global equivalent setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Pruning page of the User property sheet. Type: Boolean APDeletePFMessageDays Description: The number of days old that a message must be before it is automatically purged from any of this user’s personal folders. Dependent on APDeleteInboxMessages being true. This setting overrides the global equivalent setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Pruning page of the User property sheet. Type: Long Integer APDeleteDeletedMessages Description: A boolean setting that specifies if deleted messages will be purged for this user. Deleted messages are messages that exist in the Deleted Items folder. This setting overrides the global equivalent setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Pruning page of the User property sheet. Type: Boolean APDeleteDeletedMessageDays Description: The number of days old that a deleted message must be before it is automatically purged from this user’s account. Dependent on APDeleteDeletedMessages being true. This setting overrides the global equivalent setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Pruning page of the User property sheet. Type: Long Integer ARCanUseWebMail Description: A boolean setting that specifies whether or not this user can use WebMail. This setting overrides the global equivalent setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Restrictions page of the User property sheet. Type: Boolean ARCanUseIMAP Description: A boolean setting that specifies whether or not this user can use IMAP. This setting overrides the global equivalent setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Restrictions page of the Settings property sheet. Type: Boolean ARCanSendExternalMessages Description: A boolean setting that specifies whether or not this user can send external mail. If false, the exceptions list will prevail. This setting overrides the global equivalent setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Restrictions page of the User property sheet. Type: Boolean ARCanReceiveExternalMessages Description: A boolean setting that specifies whether or not this user can receive external mail. If false, the exceptions list will prevail. This setting overrides the global equivalent setting. This setting only applies to the Enterprise edition. It represents the corresponding user interface settings in the Account Restrictions page of the Settings property sheet. Type: Boolean Methods SetNoForwarding Description: Sets the user to have no forwarding. Syntax: SetNoForwarding() Parameters: None Return type: Boolean indicating success or failure. SetForwardUser Description: Sets the WMUser object that is the user to forward messages to, sent to this user. Syntax: SetForwardUser(user as object) Parameters: user is a WMUser object. It must not be the same as this user object. Return type: Boolean indicating success or failure. GetForwardUser Description: Gets the WMUser object that is the user that messages sent to this user are forwarded to. Syntax: GetForwardUser() Parameters: None Return type: WMUser object of the forward user. GetISPSettings Description: Get the WMUserISPSettings object for this user which contains all of this user's settings for a specified ISP. Syntax: GetISPSettings(isp as object) Parameters: isp is a WMISP object for which is the settings are to be got. Return type: WMUserISPSettings object containing the settings for the given ISP for this user. GetID Description: Get the ID of this user which is a number which uniquely identifies this user. Syntax: GetID() Parameters: None Return type: Long Integer integer containing the ID of this user. GetFirstProperty Description: Get the first property from the list of properties for this user. Syntax: GetFirstProperty() Parameters: None Return type: WMProperty object containing the first property of this user. GetNextProperty Description: Get the next property on from the property passed into this function. Syntax: GetNextProperty(property as object) Parameters: property is a WMProperty object. The next property after this one is returned. Return type: WMProperty object containing the next property. GetAddresses Description: Gets a string of all the valid addresses for the user. Syntax: GetAddresses() Parameters: None Return type: String containing all the valid addresses for this user. SetForwardGroup Description: Sets the forwarding group for this mailbox to be the group object supplied Syntax: SetForwardGroup(group as object) Parameters: group is an object of type WMGroup. Return type: Boolean indicating success or failure GetForwardGroup Description: Gets the forwarding group for this mailbox Syntax: GetForwardGroup() Parameters: None. Return type: WMGroup object representing the forwarding group GetSendAddress Description: Returns the forwarding e-mail address specified for this mailbox. Syntax: GetSendAddress() Parameters: None. Return type: String of form name@domain.com GetDomainSettings Description: Gets the domain settings object for this mailbox Syntax: GetDomainSettings(domain as object) Parameters: WMDomain Return type: WMDomain object AddDomainSetting Description: Adds a domain settings object for this mailbox. Syntax: AddDomainSettings(domain as object, sMailbox as string ) Parameters: domain is an object of type WMDomain sMailbox is a string Return type: UserDomainSettings object DeleteDomainSetting Description: Deletes the domain setting object for this mailbox Syntax: DeleteDomainSettings(settings) Parameters: settings object. Return type: Boolean indicating success or failure AddUserDefinedProperty Description: Adds a user defined property with a name of sName and gives it a value of sValue. Syntax: AddUserDefinedProperty(sName, sValue) Parameters: sName is a string which represents the name of the user defined property. sValue is a string which represents the value of the user defined property. Return type: An object which represents the new WMProperty object that was added to the user. DeleteUserDefinedProperty Description: Deletes the passed in user defined property Syntax: AddUserDefinedProperty(property) Parameters: property is the WMProperty object that will be deleted. Return type: A boolean that returns true if the property was successfully deleted. SetForwardAddress Description: Sets the e-mail address that messages sent to this user will be automatically forwarded to. This corresponds with the user interface in the Forwarding page of the User property sheet. Syntax: SetForwardAddress(sAddress) Parameters: sAddress is the e-mail address that messages should be forwarded to. Return type: A boolean that returns true if the forward address was successfully configured. GetForwardAddress Description: Gets the e-mail address that messages sent to this user will be automatically forwarded to. This corresponds with the user interface in the Forwarding page of the User property sheet. Syntax: GetForwardAddress() Parameters: None. Return type: A string that represents the e-mail address to which mail for this user is automatically forwarded. GetReceivedMessages Description: Returns a WMMessageList object, which itself contains the list of messages in this user’s InBox. Syntax: GetReceivedMessages() Parameters: None. Return type: A WMMessageList object. AddFolder Description: Adds a personal folder to this user’s list of folders. Syntax: AddFolder(sFolderName) Parameters: sFolderName is a string that represents the name of the personal folder. Return type: A WMFolder object that represents the folder that was added. GetFirstFolder Description: Gets the first folder belonging to this user. Syntax: GetFirstFolder() Parameters: None. Return type: A WMFolder object that represents the first folder belonging to this user. GetNextFolder Description: Gets the next folder belonging to this user. Syntax: GetNextFolder(folder) Parameters: The folder returned by a previous call to GetFirstFolder or GetNextFolder. Return type: A WMFolder object that represents the next folder in the list belonging to this user. GetFolderFromName Description: Gets the folder belonging to this user that matches the passed in name. Syntax: GetFolderFromName(sName) Parameters: sName is a string. Return type: A WMFolder object that matches the passed in folder name. ARGetFirstSendException Description: Returns the first ‘send exception’ listed in this user’s account restrictions for when this user is not allowed to send mail to the outside world, except to … Syntax: ARGetFirstSendException() Parameters: None Return type: String specifying the first send exception e-mail address. ARGetNextSendException Description: Returns the next ‘send exception’ listed in this user’s account restrictions for when this user is not allowed to send mail to the outside world, except to … Syntax: ARGetNextSendException(sEmailAddr as string) Parameters: sEmailAddr is a string variable specifying the current send exception e-mail address Return type: String specifying the next send exception e-mail address. ARGetFirstReceiveException Description: Returns the first ‘receive exception’ listed in this user’s account restrictions for when this user is not allowed to receive mail from the outside world, except from … Syntax: ARGetFirstReceiveException() Parameters: None Return type: String specifying the first receive exception e-mail address. ARGetNextReceiveException Description: Returns the next ‘receive exception’ listed in this user’s account restrictions for when this user is not allowed to receive mail from the outside world, except from … Syntax: ARGetNextReceiveException(sEmailAddr as string) Parameters: sEmailAddr is a string variable specifying the current receive exception e-mail address Return type: String specifying the next receive exception e-mail address. ARAddSendException Description: Adds a new Send exception address to the list Syntax: ARAddSendException(sSendAddr as string) Parameters: sSendAddr is a string variable specifying the new send exception e-mail address. Return type: Boolean indicating success or failure. ARAddReceiveException Description: Adds a new Receive exception address to the list Syntax: ARAddReceiveException(sReceiveAddr as string) Parameters: sReceiveAddr is a string variable specifying the new receive exception e-mail address. Return type: Boolean indicating success or failure. ARDeleteSendException Description: Deletes the Send exception address specified in the string parameter Syntax: ARDeleteSendException(sSendAddr as string) Parameters: sSendAddr is a string variable specifying the send exception address to be deleted Return type: Boolean indicating success or failure. ARDeleteReceiveException Description: Deletes the Receive exception address specified in the string parameter Syntax: ARDeleteReceiveException(sReceiveAddr as string) Parameters: sReceiveAddr is a string variable specifying the receive exception address to be deleted Return type: Boolean indicating success or failure. WMVirtualMailbox The WMVirtualMailbox object encapsulates a WorkgroupMail virtual mailbox and provides properties and methods to interrogate and edit virtual mailbox details. Various methods and properties of the WMSession object and other objects return a WMVirtualMailbox object and take WMVirtualMailbox objects as arguments. Properties Name Description: This property allows the user to get and set the name of the WMVirtualMailbox object. Type: String Enabled Description: The Enabled property allows the user to get and set if a WMVirtualMailbox object is enabled or disabled. Type: Boolean AutoResponder Description: Gets or sets whether this virtual mailbox is an auto responder. Type: Boolean ResponderFile Description: A string property which represents the filename of the file, which contains the auto responder text. This is a read/write property. Type: String TextFormatResponder Description: A boolean read/write property which is true if the ResponderFile is a text-formatted response file. If this property is false then WorkgroupMail expects the ResponderFile to be HTML formatted. Type: String ResponderAttachment Description: A string read/write property which represents the filename of the file (if any), which should be attached to the response message. Type: String ResponderReplyAddress Description: A string read/write property which represents the reply address of response messages sent out by this auto responder. This corresponds to the user interface in the Auto-Responding page of the Auto Responder property sheet. Type: String Methods SetNoForwarding Description: Sets the virtual mailbox to have no forwarding. Syntax: SetNoForwarding() Parameters: None Return type: Boolean indicating success or failure. SetForwardUser Description: Sets the WMUser object that is the user to forward messages to, sent to this virtual mailbox. Syntax: SetForwardUser(user as object) Parameters: user is a WMUser object. Return type: Boolean indicating success or failure. GetForwardUser Description: Gets the WMUser object that is the user that messages sent to this virtual mailbox are forwarded to. Syntax: GetForwardUser() Parameters: None Return type: WMUser object of the forward user. GetISPSettings Description: Get the WMUserISPSettings object for this virtual mailbox which contains all of this virtual mailbox's settings for a specified ISP. Syntax: GetISPSettings(isp as object) Parameters: isp is a WMISP object for which is the settings are to be got. Return type: WMUserISPSettings object containing the settings for the given ISP for this virtual mailbox. GetID Description: Get the ID of this virtual mailbox which is a number which uniquely identifies this virtual mailbox. Syntax: GetID() Parameters: None Return type: Long Integer integer containing the ID of this virtual mailbox. GetFirstProperty Description: Get the first property from the list of properties for this virtual mailbox. Syntax: GetFirstProperty() Parameters: None Return type: WMProperty object containing the first property of this virtual mailbox. GetNextProperty Description: Get the next property on from the property passed into this function. Syntax: GetNextProperty(property as object) Parameters: property is a WMProperty object. The next property after this one is returned. Return type: WMProperty object containing the next property. GetAddresses Description: Gets a string of all the valid addresses for the virtual mailbox. Syntax: GetAddresses() Parameters: None Return type: String containing all the valid addresses for this virtual mailbox. GetDomainSettings Description: Gets the domain settings object for this mailbox Syntax: GetDomainSettings(domain as object) Parameters: WMDomain Return type: WMDomain object AddDomainSetting Description: Adds a domain settings object for this mailbox. Syntax: AddDomainSettings(domain as object, sMailbox as string ) Parameters: domain is an object of type WMDomain sMailbox is a string Return type: UserDomainSettings object DeleteDomainSetting Description: Deletes the domain setting object for this mailbox Syntax: DeleteDomainSettings(settings) Parameters: settings object. Return type: Boolean indicating success or failure AddUserDefinedProperty Description: Adds a user defined property with a name of sName and gives it a value of sValue. Syntax: AddUserDefinedProperty(sName, sValue) Parameters: sName is a string which represents the name of the user defined property. sValue is a string which represents the value of the user defined property. Return type: An object which represents the new WMProperty object that was added to the virtual mailbox. DeleteUserDefinedProperty Description: Deletes the passed in user defined property Syntax: AddUserDefinedProperty(property) Parameters: property is the WMProperty object that will be deleted. Return type: A boolean that returns true if the property was successfully deleted. WMUserISPSettings The WMUserISPSettings encapsulates the object which maintains the settings for a user in relation to one ISP. This object can be accessed via a call to GetISPSettings() on the WMUser or WMVirtualMailbox object. Properties Active Description: Allows the user to get or set if these user ISP settings are active. Type: Boolean POP3LoginName Description: The POP3 login name for the associated user’s personal POP account with this ISP. WorkgroupMail uses this information to log onto the POP account at the ISP in order to download mail for the user from the ISP into WorkgroupMail. Type: String POP3Password Description: The POP3 password for the associated user’s personal POP account with this ISP. WorkgroupMail uses this information to log onto the POP account at the ISP in order to download mail for the user from the ISP into WorkgroupMail. Type: String Methods GetID Description: Gets the ID of the settings. Syntax: GetID() Parameters: None Return type: A integer that returns the ID of the record which links the associated user with the ISP. WMUserDomainSettings The WMUserDomainSettings object encapsulates the object which maintains the settings for a user in relation to a domain. This object can be accessed via a call to GetDomainSettings() on the WMUser or WMVirtualMailbox object. Properties User Description: The user that is associated with these settings. Type: WMUser object. Domain Description: The domain that is associated with these settings. Type: WMDomain object. Mailbox Description: Each user in a domain is differentiated by its unique mailbox. For example, the user Fred Smith may be part of the company.com domain and may have an associated email address of fred@company.com. This user’s Mailbox property for the company.com domain would be fred. Type: String Methods GetID Description: Gets the ID of the settings. Syntax: GetID() Parameters: None Return type: A integer that returns the ID of the record which links the associated user with the domain WMSchedule The WMSchedule object encapsulates a schedule of when to connect to an ISP. Properties CellState Description: Allows the user to get and set the cell state for the WMSchedule object given an hour and a day. The hour must be between 1 and 24 and the day must be between 1 and 7. Syntax: boolean CellState(short iHour, short iDay) void CellState(short iHour, short iDay, long bNewValue) Example: bCellState = schedule.CellState(17, 2) schedule.CellState(17, 2) = bCellState Methods WMSchedule has no methods. WMProperty The WMProperty object encapsulates one name/value pair for the property of any object. Properties Name Description: The name of the property. This is a read only property. Type: String Value Description: The value of the property. This is a read only property. Type: String MethodsWMProperty has no methods. WMFolder The WMUser object encapsulates a WorkgroupMail local user and provides properties and methods to interrogate and edit user details. Various methods and properties of the WMSession object and other objects return a WMUser object and take WMUser objects as arguments. PropertiesName Description: The name given to this folder. Type: String MethodsGetMessages Description: Returns a list of messages belonging in this folder. Syntax: GetMessages () Return type: WMMessageList GetFirstSubFolder Description: Returns the first sub folder belonging to this folder. Syntax: GetFirstSubFolder () Return type: WMFolder GetNextSubFolder Description: Returns the next sub folder belonging to this folder. Syntax: GetFirstSubFolder (folder) Parameters: folder is the folder returned by a previous call to GetFirstSubFolder() or GetNextSubFolder(). Return type: WMFolder AddSubFolder Description: Adds a sub folder with the passed in name to this folder. Syntax: AddSubFolder (sFolder) Parameters: sFolder is the name given to the new sub folder Return type: WMFolder DeleteSubFolder Description: Deletes the passed in sub folder and optionally the messages in that folder. Syntax: DeleteSubFolder (folder, bDeleteMessages) Parameters: folder is the sub folder that is to be deleted. BDeleteMessages should be set to True if you want to delete the messages in the sub folder. Return type: Boolean GetSubFolderFromName Description: Gets a sub folder by name. Syntax: GetSubFolderByName (sFolder) Parameters: sFolder is the name of the subfolder that you wish to return. Return type: WMFolder GetMessageCount Description: Gets the number of messages in this folder. Syntax: GetMessageCount() Parameters: None Return type: An integer representing the number of messages in the folder. GetFirstProperty Description: Get the first property from the list of properties for this folder. Syntax: GetFirstProperty() Parameters: None Return type: WMProperty object containing the first property of this folder. GetNextProperty Description: Get the next property on from the property passed into this function. Syntax: GetNextProperty(property as object) Parameters: property is a WMProperty object. The next property after this one is returned. Return type: WMProperty object containing the next property. WMPublicFolderThe WMPublicFolder object encapsulates a WorkgroupMail public folder. PropertiesName Description: The display name of the public folder. Type: String Rule Description: The action taken by this public folder on the messages inside. Type: Integer. Permitted values are: 0 = Keep, 1 = Move messages, 2 = Delete messages. MoveToFolder Description: If the Rule property is set to 1 (Move Messages), then this property represents the WMFolder to which the messages should be moved. Type: WMFolder object. AfterMinutes Description: If the Rule property is set to 1 (Move Messages) or 2 (Delete messages), then this property represents the number of minutes that the message must reside in the public folder before having the move or delete rule applied. Type: Integer. MethodsGetMessages Description: Returns the a WMMessageList that contains the list of messages in the public folder. Syntax: GetMessages() Parameters: None Return type: WMMessageList. GetMessageCount Description: Returns the number of messages in the quarantine. Syntax: GetMessageCount() Parameters: None Return type: Integer. WMQuarantineAreaThe WMQuarantineArea object encapsulates a WorkgroupMail quarantine area. PropertiesName Description: The display name of the quarantine. Type: String Description Description: The description shown for the quarantine area in the WorkgroupMail administrator. Type: String Rule Description: The action taken by this public folder on the messages inside. Type: Integer. Permitted values are: 0 = Keep, 1 = Allow messages through, 2 = Delete messages. AfterMinutes Description: If the Rule property is set to 1 (Move Messages) or 2 (Delete messages), then this property represents the number of minutes that the message must reside in the quarantine before having the move or delete rule applied. Type: Integer. TimeOption Description: If the Rule property is set to 1 (Move Messages) or 2 (Delete messages), then this property represents whether the rule will be applied after a certain period of time (according to the AfterMinutes property), or in a certain time range (according to the GetTimeRange method). Type: Integer. Permitted values are: 0 = After a certain period of time, 1 = In a certain time range. MethodsGetIncomingMessages Description: Returns the a WMMessageList that contains the list of incoming messages in the quarantine. Syntax: GetIncomingMessages() Parameters: None Return type: WMMessageList. GetOutcomingMessages Description: Returns the a WMMessageList that contains the list of outcoming messages in the quarantine. Syntax: GetOutcomingMessages() Parameters: None Return type: WMMessageList. GetTimeRange Description: If the Rule property is set to 1 (Move Messages) or 2 (Delete messages), and the TimeOption is set to 1 (In a certain time range) then this property represents the time range of interest. The returned object is a WMSchedule object. Syntax: GetTimeRange() Parameters: None Return type: WMSchedule object. ReleaseMessage Description: Releases the message from the quarantine. Syntax: ReleaseMessage() Parameters: None Return type: Boolean. True if successful, False otherwise. WMMessage The WMMessage object encapsulates a sent or received message, allowing the user of the API to determine detains of messages that have been sent by clients but not sent to the appropriate ISP yet and messages that have been received into WorkgroupMail but not collected by clients yet. Properties Subject Description: The subject of the message. This is a read only property. Type: String Received Description: Gets the received time of a received message. This is a read only property. Type: DATE Sent Description: Get the sent time of a sent message. This is a read only property. Type: DATE Sender Description: Gets the sender address for the message. This property is read only. Type: String Recipients Description: This property gets a string containing all the recipient addresses. This is a read only property. Type: String Size Description: Gets the size of the message in bytes. This is a read only property. Type: Long Integer Account Description: This property gets the name of the ISP account that this sent message is using. This is a read only property. Type: String Filename Description: This read only property gets the filename that stores the sent or received message. Type: String SenderAddress Description: This read/write property gets the address of the sender of the message. Type: String Read Description: This read/write property gets or sets whether or not this message has been opened. Type: Boolean Methods GetHTMLBody Description: Returns the HTML part of the message in a string. Syntax: GetHTMLBody() Parameters: None Return type: String. GetTextBody Description: Returns the Text part of the message in a string. Syntax: GetTextBody() Parameters: None Return type: String. GetTextBodyAsHTML Description: Returns the Text part of the message in a string. The string is HTML encoded. Syntax: GetTextBodyAsHTML Parameters: None Return type: String. MoveToFolder Description: Moves this message to the passed in folder. Syntax: MoveToFolder(folder) Parameters: AWMFolder object, which represents the folder to which the message should be moved. Return type: Boolean. True if the message was successfully moved, False otherwise. Delete Description: Deletes this message Syntax: Delete Parameters: None. Return type: Boolean. True if the message was successfully deleted. False otherwise. GetToRecipients Description: Returns a string, which lists the To: recipients of the message. If there is more than one recipient then each recipient is separated by a ‘;’ character. Syntax: GetToRecipients() Parameters: None. Return type: String. GetCCRecipients Description: Returns a string, which lists the Cc: recipients of the message. If there is more than one recipient then each recipient is separated by a ‘;’ character. Syntax: GetCCRecipients() Parameters: None. Return type: String. GetFirstAttachment Description: Returns a WMAttachment object, which is the first attachment of the message. Syntax: GetFirstAttachment() Parameters: None. Return type: A WMAttachment object, or Nothing if the message does not have any attachments. GetNextAttachment Description: Returns a WMAttachment object, which is the next attachment of the message, after the passed in attachment. Syntax: GetFirstAttachment(prevAttachment) Parameters: prevAttachment is a WMAttachment, which is the attachment object that was returned from a previous call to GetFirstAttachment or GetNextAttachment. Return type: A WMAttachment object, or Nothing if the message does not have any attachments. WMMessageList The WMMessageList object encapsulates a snapshot of all sent or received messages in WorkgroupMail. Properties The WMMessageList object has no properties. Methods GetFirstMessage Description: Gets the first message in the message list. Syntax: GetFirstMessage() Parameters: None Return type: A WMMessage object which is the first message in the list. GetNextMessage Description: Gets the next message in the message list. Syntax: GetNextMessage(message as object) Parameters: message is a WMMessage object returned by a previous call to GetFirstMessage() or GetNextMessage() Return type: A WMMessage object which is the next message in the list GetLastMessage Description: Gets the last message in the message list. Syntax: GetLastMessage() Parameters: None Return type: A WMMessage object which is the last message in the list. GetPreviousMessage Description: Gets the previous message in the message list. Syntax: GetPreviousMessage(message as object) Parameters: message is a WMMessage object returned by a previous call to GetLastMessage() or GetPreviousMessage() Return type: A WMMessage object which is the previous message in the list GetCount Description: Gets the number of messages in the message list. Syntax: GetCount() Parameters: None Return type: Long number of messages SortByDate Description: Sorts the messages in the list by date. Syntax: SortByDate(bAscending) Parameters: bAscending - A boolean which should be set to true if the list is to be sorted in an ascending fashion or false if the list is to be sorted in a descending fashion. Return type: Nothing SortBySubject Description: Sorts the messages in the list alphabetically by subject. Syntax: SortBySubject(bAscending) Parameters: bAscending - A boolean which should be set to true if the list is to be sorted in an ascending fashion or false if the list is to be sorted in a descending fashion. Return type: Nothing SortBySender Description: Sorts the messages in the list alphabetically by sender name. Syntax: SortBySender(bAscending) Parameters: bAscending - A boolean which should be set to true if the list is to be sorted in an ascending fashion or false if the list is to be sorted in a descending fashion. Return type: Nothing SortByRecipients Description: Sorts the messages in the list alphabetically by recipient name. Syntax: SortByRecipients(bAscending) Parameters: bAscending - A boolean which should be set to true if the list is to be sorted in an ascending fashion or false if the list is to be sorted in a descending fashion. Return type: Nothing WMComposeMessage The WMComposeMessage object encapsulates a message being sent by the WorkgroupMail API. Properties The WMComposeMessage object has no properties. Methods SetSubject Description: Sets the subject of the message being composed. Syntax: SetSubject(string sSubject) Parameters: sSubject is the new subject string. Return type: Boolean indicating success or failure. SetMessageText Description: Sets the message body text of the message being composed. Syntax: SetMessageText(string sMessageText) Parameters: sMessageText is the new message string. Return type: Boolean indicating success or failure. SetSender Description: Sets the sender of the message being composed. Syntax: SetSender(string sName, string sAddress) Parameters: sName is the name of the sender. sAddress is the sender's address. Return type: Boolean indicating success or failure. AddRecipient Description: Adds a recipient to the new message. The message will be sent to all added recipients. Syntax: AddRecipient(string sName, string sAddress) Parameters: sName is the name of the recipient. sAddress is the recipient's address. Return type: Boolean indicating success or failure. AddRecipients Description: Adds one or more recipients to the new message. If there is more than one recipient, each recipient must be separated by a ‘;’ character. Syntax: AddRecipient(string sRecipients, integer iType) Example: message.AddRecipients(“fred@bloggs.com;John <john@domain.com>”) Parameters: sRecipients is the ‘;’ separated list of recipient names and addresses. iType specifies whether the recipients should be added to the To:, Cc or Bcc list. The values are: 0 = To, 1 = Cc, 2 = Bcc. Return type: Boolean indicating success or failure. AddAttachment Description: Adds an attachment to the message being composed. Syntax: AddAttachment(string sDisplayName, string sFilename) Parameters: sDisplayName is the filename of the attachment without it's path that you wish the receiver of the message to see. sFilename is the full path and filename of the file being attached. Return type: Boolean indicating success or failure. Send Description: Send the composed message. The message must have at least one recipient and a sender address. Syntax: Send() Parameters: None Return type: Boolean indicating success or failure. Send Description: Send the composed message. The message must have at least one recipient and a sender address. Syntax: Send() Parameters: None Return type: Boolean indicating success or failure. SendKeepCopy Description: Sends the composed message, keeping a copy of the sent message in the user’s Sent Items personal folder. The message must have at least one recipient and a sender address. Syntax: SendKeepCopy() Parameters: None Return type: Boolean indicating success or failure. SendUsingSMTP Description: Sends the composed message by establishing a connection to the passed in server on the passed in port number (the default port number should be 25) and sending via SMTP. The message must have at least one recipient and a sender address. Syntax: SendUsingSMTP(sServer, iPort) Parameters: sServer - A string which represents the IP address or server name of the SMTP server. iPort - The port number on which an SMTP session will be established. This should nearly always be set to 25. Return type: Boolean indicating success or failure. SendUsingSMTPKeepCopy Description: Sends the composed message by establishing a connection with the passed in server on the passed in port number (the default port number should be 25) and sending via SMTP, keeping a copy of the sent message in the user’s Sent Items personal folder. The message must have at least one recipient and a sender address. Syntax: SendUsingSMTPKeepCopy(sServer, iPort) Parameters: sServer - A string which represents the IP address or server name of the SMTP server. iPort - The port number on which an SMTP session will be established. This should nearly always be set to 25. Return type: Boolean indicating success or failure. SendMIMEFileUsingSMTP Description: Sends the passed in MIME file by establishing a connection with the passed in server on the passed in port number (the default port number should be 25) and sending via SMTP. Syntax: SendMIMEFileUsingSMTP(sMIMEFile, bKeepCopy, sServer, iPort) Parameters: sMIMEFile - A string which represents the filename of a file which contains a MIME formatted message. bKeepCopy - a boolean that indicates whether or not a copy of the sent message should be kept in the user’s Sent Items folder. sServer - A string which represents the IP address or server name of the SMTP server. iPort - The port number on which an SMTP session will be established. This should nearly always be set to 25. Return type: Boolean indicating success or failure. SendMIMEFile Description: Sends the passed in MIME file. Syntax: SendMIMEFile(sMIMEFile, bKeepCopy) Parameters: sMIMEFile - A string which represents the filename of a file which contains a MIME formatted message. bKeepCopy - a boolean that indicates whether or not a copy of the sent message should be kept in the user’s Sent Items folder. Return type: Boolean indicating success or failure. WMAttachmentThe WMAttachment object encapsulates a message attachment. PropertiesThis object does not contain any properties. Methods GetFileName() Description: Gets the display name for the attachment. Syntax: GetFileName() Return type: String GetFileSize() Description: Returns the size of the attachment in bytes. Syntax: GetFileSize() Return type: Integer GetFileSizeString() Description: Returns a string which represents the size of the attachment. The units of the file size will change according to the size, i.e. 2 MB, rather than 2048 KB, or 1 KB, rather than 1024 bytes. Syntax: GetFileSizeString() Return type: String Decode() Description: Decodes the attachment to a specified folder. Syntax: Decode() Return type: String, which points to a filename of the actual decoded attachment file. GetEmbedded() Description: Returns True if this attachment is an embedded reference inside the message rather than a separate file attachment. Syntax: GetEmbedded() Return type: Boolean. WMSpamServer The WMSpamServer object encapsulates a WorkgroupMail local user and provides properties and methods to interrogate and edit user details. Various methods and properties of the WMSession object and other objects return a WMSpamServer object and take WMSpamServer objects as arguments. PropertiesName Description: The name given to this spam server. Type: String ServerAddress Description: The server address for this spam server. Type: String Enabled Description: True if this spam server is enabled. False otherwise. Type: Boolean MethodsGetID() Description: Gets the unique identifier of this spam server. Syntax: GetID () Return type: Integer |
||||||||||||||||||||||||||||||||||||||||||||