PowerTCP Mail for .NET
BeginGet(Object) Method
See Also  Send comments on this topic.
Dart.PowerTCP.Mail Namespace > PopMessage Class > BeginGet Method : BeginGet(Object) Method




state
User state information.
Asynchronously get a single message from the server. The message will be encapsulated by a MessageStream, made accessible in the Pop.EndGet event.

Syntax

Visual Basic (Declaration) 
Public Overloads Sub BeginGet( _
   ByVal state As Object _
) 
Visual Basic (Usage)Copy Code
Dim instance As PopMessage
Dim state As Object
 
instance.BeginGet(state)
C# 
public void BeginGet( 
   object state
)
Managed Extensions for C++ 
public: void BeginGet( 
   Object* state
) 
C++/CLI 
public:
void BeginGet( 
   Object^ state
) 

Parameters

state
User state information.

Return Value

An IAsyncResult that represents the asynchronous operation, which could still be pending.

Remarks

This method begins to asynchronously get a message from the server. Upon completion of the method, the Pop.EndGet event will be raised. A PopEventArgs object will be passed into the Pop.EndGet event, providing data about the message retrieved. For example, the message itself is accessible in PopEventArgs.PopMessage.Message, which will be a MessageStream object. The MessageStream object provides flexibility and functionality in accessing the message. For example, message header lines, message text, and message attachments are all available as collections of the MessageStream object. The MessageStream object also provides decoding of MIME parts "on the fly".

For more information about using events, see Using Events In PowerTCP.

The parameter state is useful for any kind of data you would like accessible in the Pop.EndGet event.

To perform this operation synchronously, use the PopMessage.Get method.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

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