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




first
An ImapMessage object representing the first message in the range to get.
last
An ImapMessage object representing the last message in the range to get.
sections
An ImapMessageSections value specifying the portion of the message to get.
state
User state information.
Begins to asynchronously retrieve a specified portion of the messages contained in the specified range.

Syntax

Visual Basic (Declaration) 
Public Overloads Function BeginGet( _
   ByVal first As ImapMessage, _
   ByVal last As ImapMessage, _
   ByVal sections As ImapMessageSections, _
   ByVal state As Object _
) As IAsyncResult
Visual Basic (Usage)Copy Code
Dim instance As Mailbox
Dim first As ImapMessage
Dim last As ImapMessage
Dim sections As ImapMessageSections
Dim state As Object
Dim value As IAsyncResult
 
value = instance.BeginGet(first, last, sections, state)
C# 
public IAsyncResult BeginGet( 
   ImapMessage first,
   ImapMessage last,
   ImapMessageSections sections,
   object state
)
Managed Extensions for C++ 
public: IAsyncResult* BeginGet( 
   ImapMessage* first,
   ImapMessage* last,
   ImapMessageSections sections,
   Object* state
) 
C++/CLI 
public:
IAsyncResult^ BeginGet( 
   ImapMessage^ first,
   ImapMessage^ last,
   ImapMessageSections sections,
   Object^ state
) 

Parameters

first
An ImapMessage object representing the first message in the range to get.
last
An ImapMessage object representing the last message in the range to get.
sections
An ImapMessageSections value specifying the portion of the message to get.
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.
System.ArgumentOutOfRangeExceptionindex was out of range
System.IndexOutOfRangeExceptionindex was outside bounds of array
Dart.PowerTCP.Mail.InvalidParameterTypeExceptionCollection contains instances of wrong type of object

Remarks

The Mailbox.BeginGet method begins to asynchronously retrieve some portion of all of the messages that are within the range specified by first and last. Upon completion of the operation, the Imap.EndGetMessage event is raised. Both first and last must be located in the mailbox. This method uses the IMAP FETCH command to retrieve message content. The command uses the UIDs of the messages in the collection to retrieve content.

This method is useful for bulk operations. If you would like to retrieve only a single message, use the ImapMessage.BeginGet method of the ImapMessage object.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

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