| script | cms.cpl |
|---|---|
| interface | MessageStore |
| COM progId | Carapace.MessageStore |
Carapace message stores -- as the name suggests -- store messages for users.
They are accessed using the MessageStore interface.
Click here for a general description of Carapace message stores.
An MessageStore is created by using the
create function eg.
(create MessageStore aud)
where aud is an Auditor object.
| property name | property type | description |
|---|---|---|
addressType |
String | the type of address used within
the message store -- the default type is email signifying
Internet-style addresses (RFC-822)
|
userId |
String | a unique id for the user |
password |
String | the user's password -- for validation against the value stored within the database |
state |
String | the state of the message store connection -- either connected
or disconnected
|
msid |
Integer | the message store identifier -- valid once connected |
The MessageStore interface contains
the following methods:
connect |
connect to the message store |
disconnect |
disconnect from the message store |
isConnected |
test if the message store connection has been established |
abandon |
abandon the message store connection -- any messages which have been marked for deletion have their status reset |
store |
store a message for the identified recipients |
fetch |
fetch the identified message |
delete |
delete the identified message |
count |
count the no. of messages in the user's message store |
size |
return the total size of all messages held in the user's message store |
msgSize |
return the size of the given message - returns -1 if there is no such message |
summary |
summarise the contents of the user's message store |
list |
list messages having the given status -- a status of *
means all messages
|
setStatus |
set the status of the identified message |
markedForDelete |
test if the identified message has been marked for deletion |
userDomain |
determine the domain from the supplied address |
isLocalUser |
if the supplied address is local -- ie. within a local domain --
return the message store id
otherwise return the empty List ()
|
connect
Connect to the user's message store. The user and password
properties are checked against the values in the database using the
Authentication interface.
If connection is successful, a session identifier is returned.
Arguments: none
Return type: String
disconnectDisconnect from the user's message store.
Arguments: none
Return type: the empty List ()
isConnected
Test if the message store connection has been established. If there is no
connection, the empty List ()
is returned.
Arguments: none
Return type: Object
abandonAbandon the message store connection -- any messages which have been marked for deletion have their status reset.
Arguments: none
Return type: the empty List ()
storeStore a message for the identified recipients. The sender address and the addresses for each recipient must be formated correctly according to the address type for the message store.
A unique id for the stored message is returned.
Arguments:
| sender | String |
| recipients | List |
| subject | String |
| contentType | String |
| header | String |
| msg | String |
Return type: String
fetchFetch the identified message. An error is raised if the supplied number does not identify a message within the user's message store.
Arguments:
| msgNo | Integer |
Return type: String
deleteMark the identified message for deletion. An error is raised if the supplied number does not identify a message within the user's message store or if the message has already been marked for deletion.
The message is irrevocably deleted from the store on a successful disconnect or if deleteMarkedMessages is explicitly invoked.
Arguments:
| msgNo | Integer |
Return type: the empty List
countCount the no. of messages in the user's message store.
Arguments: none
Return type: Integer
sizeReturn the total size of all messages held in the user's message store.
Arguments: none
Return type: Integer
msgSizeReturn the size of the given message -- returns -1 if there is no such message.
Arguments:
| msgNo | Integer |
Return type: Integer
summary
Summarise the contents of the user's message store. A List
of ( msgNo msgSize ) pairs is returned.
Arguments: none
Return type: List
list
List messages having the given status -- a status of *
means all messages. Individual status codes are given in the following table:
new |
listed |
fetched |
deleted |
The returned List contains lists holding the following:
Arguments: none
Return type: List
setStatusSet the status of the identified message.
Arguments:
| msgNo | Integer |
Return type: the empty List
markedForDelete
Test if the identified message has been marked for deletion. The empty
List () is returned if the message has
not been marked for deletion.
Arguments:
| msgNo | Integer |
Return type: Object
userDomain
Determine the domain from the supplied address. The address must be in the same
type as the addressType property for this message store.
Arguments:
| address | String |
Return type: String
isLocalUser
If the supplied address is local -- ie. within a local domain
and identifies a user who has a message store --
return the message store id otherwise return the empty
List ().
Arguments:
| address | String |
Return type: Object
| Contents | Index | Current topic: audit | Related topics: databases |