| Visual Basic (Declaration) | |
|---|---|
Public Overloads Function BeginGet( _ ByVal messages As ICollection, _ ByVal sections As ImapMessageSections, _ ByVal state As Object _ ) As IAsyncResult | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As Mailbox Dim messages As ICollection Dim sections As ImapMessageSections Dim state As Object Dim value As IAsyncResult value = instance.BeginGet(messages, sections, state) | |
| C# | |
|---|---|
public IAsyncResult BeginGet( ICollection messages, ImapMessageSections sections, object state ) | |
| Managed Extensions for C++ | |
|---|---|
public: IAsyncResult* BeginGet( ICollection* messages, ImapMessageSections sections, Object* state ) | |
| C++/CLI | |
|---|---|
public: IAsyncResult^ BeginGet( ICollection^ messages, ImapMessageSections sections, Object^ state ) | |
Parameters
- messages
- A collection of ImapMessage objects specifying the messages 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.| 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. |
| System.ArgumentOutOfRangeException | index was out of range |
| System.IndexOutOfRangeException | index was outside bounds of array |
| Dart.PowerTCP.Mail.InvalidParameterTypeException | Collection contains instances of wrong type of object |
The Mailbox.BeginGet method begins to asynchronously retrieve some portion of all of the messages contained in messages and uses the data to populate that collection and its contents. Upon completion of the operation, the Imap.EndGetMessage is raised. All of the ImapMessage objects contained in messages 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.
Target Platforms: Microsoft .NET Framework 2.0