Crystalbyte.Equinox.Imap.ImapClient.Fetch C# (CSharp) Method

Fetch() public method

The FETCH command retrieves data associated with a message in the mailbox. The data items to be fetched can be either a single atom or a parenthesized list. http://tools.ietf.org/html/rfc3501#section-6.4.5
public Fetch ( Crystalbyte.Equinox.Imap.SequenceSet set, string query ) : FetchImapResponse
set Crystalbyte.Equinox.Imap.SequenceSet The list of ids of the messages to fetch.
query string The query, consisting of message parts to fetch.
return FetchImapResponse
        public FetchImapResponse Fetch(SequenceSet set, string query)
        {
            var text = string.Format("FETCH {0} {1}", set, query);
            var command = new ImapCommand(text);
            var reader = SendAndReceive(command);
            var response = new FetchImapResponse();

            response.Parse(reader);
            return response;
        }