Permanently removes all messages that have the \Deleted flag set from the specified mailbox.
Namespace: S22.ImapAssembly: S22.Imap (in S22.Imap.dll) Version: 3.6.0.0 (3.6.0.0)
Syntax
C# |
---|
public void Expunge( string mailbox = null ) |
Parameters
- mailbox (Optional)
- Type: System..::..String
The mailbox to remove all messages from that have the \Deleted flag set. If this parameter is omitted, the value of the DefaultMailbox property is used to determine the mailbox to operate on.
Implements
IImapClient..::..Expunge(String)
Exceptions
Exception | Condition |
---|---|
S22.Imap..::..BadServerResponseException | The expunge operation could not be completed. The message property of the exception contains the error message returned by the server. |
System..::..ObjectDisposedException | The ImapClient object has been disposed. |
System.IO..::..IOException | There was a failure writing to or reading from the network. |
S22.Imap..::..NotAuthenticatedException | The method was called in non-authenticated state, i.e. before logging in. |