mapi_delete_mail_ex

MS Exchange Server Functions (mapi)

Deletes the current or selected email entries for a specific session.

int mapi_delete_mail_ex( MAPI *ppmapi, char *transaction, [char *ID,] LAST );
ppmapiA session identifier.
transactionA transaction name for this step in quotes. To instruct VuGen not to create a transaction for this step, use a NULL string, "".
IDThe ID of messages to delete. Use the following format: "Id=number"
LAST A marker indicating the end of the argument list.

The mapi_delete_mail_ex function deletes messages on the MS Exchange server for a specific session.

This function is for use with multiple sessions. For global sessions, use the mapi_delete_mail function, which leaves out the session identifier.

Return Values

If this function succeeds, it returns LR_PASS. Otherwise, it returns LR_FAIL.

Parameterization

All arguments of this function of the type char, can be parameterized with standard parameterization.

Example

In the following example, the mapi_delete_mail_ex function deletes all or selected messages.

// Delete all mail
    mapi_delete_mail_ex(&mapi,"DeleteMail",
                LAST );
// Delete mail w/ Message Id=XYZ & ABC
    mapi_delete_mail_ex(&mapi,"DeleteMail",
                "Id=ABC",
                "Id=XYZ",
                LAST );