ImapExpungeMailbox Function  
 
INT WINAPI ImapExpungeMailbox(
  HCLIENT hClient,  
  LPIMAPMAILBOX lpMailboxInfo  
);

The ImapExpungeMailbox function removes all messages marked for deletion from the current mailbox.

Parameters

hClient
Handle to the client session.
lpMailboxInfo
A pointer to an IMAPMAILBOX structure which contains information about the mailbox when the function returns. This parameter may be NULL if the caller does not require any information about the mailbox.

Return Value

If the function succeeds, it returns zero. If an error occurs, the function returns IMAP_ERROR. To get extended error information, call ImapGetLastError.

Remarks

The ImapExpungeMailbox function causes all messages marked for deletion to be removed from the mailbox. Note that this can cause the mailbox's UID to change, and potentially invalidate the current message UIDs. It is recommended that applications use the information returned in the IMAPMAILBOX structure to update any internal state information stored on the local system.

Requirements

Client: Requires Windows 7, Windows Vista or Windows XP.
Server: Requires Windows Server 2008 or Windows Server 2003.
Header: Include cstools7.h.
Library: Use csmapav7.lib.
Unicode: Implemented as Unicode and ANSI versions.

See Also

ImapCreateMailbox, ImapExamineMailbox, ImapGetFirstMailbox, ImapGetNextMailbox, ImapRenameMailbox, ImapSelectMailbox