| Visual Basic (Declaration) | |
|---|---|
Public Function BeginPurge( _ ByVal state As Object _ ) As IAsyncResult | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As Mailbox Dim state As Object Dim value As IAsyncResult value = instance.BeginPurge(state) | |
| C# | |
|---|---|
public IAsyncResult BeginPurge( object state ) | |
| Managed Extensions for C++ | |
|---|---|
public: IAsyncResult* BeginPurge( Object* state ) | |
| C++/CLI | |
|---|---|
public: IAsyncResult^ BeginPurge( Object^ state ) | |
Parameters
- state
- User state information.
Return Value
An IAsyncResult that represents the asynchronous operation, which could still be pending.| Exception | Description |
|---|---|
| Dart.PowerTCP.Mail.ProtocolException | Bad IMAP protocol response received from server. |
| System.Net.Sockets.SocketException | The requested address is not valid in its context. |
| System.InvalidOperationException | BeginXXX method used without providing an EndXXX event handler. |
The Mailbox.BeginPurge method deletes all messages marked for deletion (messages with the \Delete flag set, also with ImapMessage.Delete = true). Upon completion of this operation, the Imap.EndPurge event is raised. This method uses the IMAP EXPUNGE command to delete all the marked messages . If you have Imap.AutoPurge set to true there is no need to explicitly call Mailbox.Purge as the messages will automatically be expunged.
Target Platforms: Microsoft .NET Framework 2.0