PowerTCP Mail for .NET
Get(ImapMessage[],ImapMessageInfo) Method
Example 




Subset of messages found in this MailBox.
Message sections to update.
Retrieves and updates the specified mailbox messages.
Syntax
Public Overloads Function Get( _
   ByVal messages() As ImapMessage, _
   ByVal sections As ImapMessageInfo _
) As ImapMessage()
Dim instance As Mailbox
Dim messages() As ImapMessage
Dim sections As ImapMessageInfo
Dim value() As ImapMessage
 
value = instance.Get(messages, sections)

Parameters

messages
Subset of messages found in this MailBox.
sections
Message sections to update.

Return Value

Array of ImapMessage objects retrieved.
Exceptions
ExceptionDescription
ProtocolExceptionBad IMAP protocol response received from server.
Remarks
Retrieves a section of the specified messages. This method uses the IMAP FETCH command and UUIDs to retrieve message content. This method is useful for bulk operations. Use Get to retrieve a single message.
Example
This example demonstrates retrieving the headers for all messages in the current mailbox.
/// <summary>
/// Retrieves the headers for all messages in the current mailbox.
/// </summary>
/// <param name="myImap">A connected and authenticated Imap instance, that has a mailbox selected.</param>
public void GetMessageHeaders(Imap myImap)
{
    //Get headers for all messages in the box
    myImap.SelectedMailbox.Get(myImap.SelectedMailbox.ToArray(), ImapMessageInfo.Header);
}
''' <summary>
''' Retrieves the headers for all messages in the current mailbox.
''' </summary>
''' <param name="myImap">A connected and authenticated Imap instance, that has a mailbox selected.</param>
Public Sub GetMessageHeaders(ByVal myImap As Imap)
    'Get headers for all messages in the box
    myImap.SelectedMailbox.Get(myImap.SelectedMailbox.ToArray(), ImapMessageInfo.Header)
End Sub
See Also

Reference

Mailbox Class
Mailbox Members
Overload List


PowerTCP Mail for .NET Documentation Version 4.3
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic