mailDeleteMessage
PowerScript function
Description
Deletes a mail message from the user’s electronic mail inbox.
Applies to
mailSession object
Syntax
|
1 |
mailsession.mailDeleteMessage ( messageid ) |
|
Argument |
Description |
|---|---|
|
mailsession |
A mailSession object identifying the session in which you |
|
messageid |
A string whose value is the ID of the mail message to be |
Return value
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 2 3 4 5 6 7 8 9 |
string sID integer nRow mailReturnCode mRet nRow = GetClickedRow() IF nRow > 0 THEN sID = GetItemString(nRow, "messageID") mRet = mSes.mailDeleteMessage(sID) END IF |
See also