Imap |
public override void Expunge( CancellationToken cancellationToken = default )
Exception | Condition |
---|---|
ObjectDisposedException | The ImapClient has been disposed. |
FolderNotOpenException | The ImapFolder is not currently open in read-write mode. |
ServiceNotConnectedException | The ImapClient is not connected. |
ServiceNotAuthenticatedException | The ImapClient is not authenticated. |
OperationCanceledException | The operation was canceled via the cancellation token. |
IOException | An I/O error occurred. |
ImapProtocolException | The server's response contained unexpected tokens. |
ImapCommandException | The server replied with a NO or BAD response. |
The EXPUNGE command permanently removes all messages in the folder that have the Deleted flag set.
For more information about the EXPUNGE command, see rfc3501.
Note |
---|
Normally, a MessageExpunged event will be emitted for each message that is expunged. However, if the IMAP server supports the QRESYNC extension and it has been enabled via the EnableQuickResync(CancellationToken) method, then the MessagesVanished event will be emitted rather than the MessageExpunged event. |