mailDeleteMessage

Description

Deletes a mail message from the user’s electronic mail inbox.

Applies to

mailSession object

Syntax

mailsession.mailDeleteMessage ( messageid )

Argument

Description

mailsession

A mailSession object identifying the session in which you want to delete the message

messageid

A string whose value is the ID of the mail message to be deleted

Returns

mailReturnCode. Returns one of the following values:

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

Example 1

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:

string sID

integer nRow

mailReturnCode mRet


nRow = GetClickedRow()

IF nRow > 0 THEN

    sID = GetItemString(nRow, "messageID")

    mRet = mSes.mailDeleteMessage(sID)

END IF

See also