mailDeleteMessage PowerScript function
Description
Deletes a mail message from the user’s electronic
mail inbox.
Controls
mailSession object
Syntax
|
1 |
<span>mailsession</span>.<span>mailDeleteMessage</span> ( <span>messageid</span> ) |
|
Argument |
Description |
|---|---|
|
mailsession |
A mailSession object identifying the |
|
messageid |
A string whose value is the ID of the |
Return Values
mailReturnCode. Returns one of the following values:
-
mailReturnSuccess!
-
mailReturnFailure!
-
mailReturnInsufficientMemory!
-
mailReturnInvalidMessage!
-
mailReturnUserAbort!
If any argument’s value is null, mailDeleteMessage returns null.
Usage
To get a list of message IDs in the user’s inbox,
call the mailGetMessages function. Before calling mail
functions, you must declare and create a mailSession object and
call mailLogon to establish a mail session.
Examples
Assume the DataWindow dw_inbox contains
a list of mail items (sender, subject, postmark, and message ID),
and that the mail session mSes has been created
and a successful logon has occurred. This script for the clicked
event for dw_inbox deletes the selected
message from the mail system:
|
1 |
string sID |
|
1 |
integer nRow |
|
1 |
mailReturnCode mRet |
|
1 |
|
1 |
nRow = GetClickedRow() |
|
1 |
IF nRow > 0 THEN |
|
1 |
sID = GetItemString(nRow, "messageID") |
|
1 |
mRet = mSes.<span>mailDeleteMessage</span>(sID) |
|
1 |
END IF |