PowerTCP Mail for .NET
BeginPurge Method
See Also  Send comments on this topic.
Dart.PowerTCP.Mail Namespace > Mailbox Class : BeginPurge Method




state
User state information.
Begins to asynchronously delete all messages marked for deletion.

Syntax

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.

Exceptions

ExceptionDescription
Dart.PowerTCP.Mail.ProtocolExceptionBad IMAP protocol response received from server.
System.Net.Sockets.SocketExceptionThe requested address is not valid in its context.
System.InvalidOperationExceptionBeginXXX method used without providing an EndXXX event handler.

Remarks

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.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 3.2
© 2010 Dart Communications. All Rights Reserved.