ImapGetDeletedMessages Function  
 
INT WINAPI ImapGetDeletedMessages(
  HCLIENT hClient,  
  UINT *lpnMessageIds,  
  INT nMaxMessages  
);

The ImapGetDeletedMessages function returns the message identifiers for those messages that have been marked for deletion in the current mailbox.

Parameters

hClient
Handle to the client session.
lpnMessageIds
A pointer to an array of unsigned integers that will contain the message identifiers of those messages which have been marked for deletion in the current mailbox. This parameter may be NULL, in which case the function will return the number of deleted messages but will not return their identifiers.
nMaxMessages
The maximum number of message identifiers that may be stored in the lpnMessageIds array. If the lpnMessageIds parameter is NULL, this value should be zero.

Return Value

If the function succeeds, the return value is the number of messages marked for deletion in the current mailbox. If the function fails, the return value is IMAP_ERROR. To get extended error information, call ImapGetLastError.

Remarks

The message identifiers returned by this function are only valid until the mailbox is expunged or another mailbox is selected.

To remove the deleted flag from a message, use the ImapUndeleteMessage function. To prevent all messages in the current mailbox from being expunged, use the ImapReselectMailbox function to reset the current mailbox state.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: csmapv12.lib

See Also