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

Examine() public method

The EXAMINE command is identical to SELECT and returns the same output; however, the selected mailbox is identified as read-only. http://tools.ietf.org/html/rfc3501#section-6.3.2
public Examine ( string mailboxName ) : Crystalbyte.Equinox.Imap.Responses.SelectExamineImapResponse
mailboxName string The name of the mailbox to select.
return Crystalbyte.Equinox.Imap.Responses.SelectExamineImapResponse
        public SelectExamineImapResponse Examine(string mailboxName)
        {
            // we need to convert non ASCII names according to IMAP specs.
            // http://tools.ietf.org/html/rfc2060#section-5.1.3
            var name = MailboxNameEncoder.Encode(mailboxName);

            var text = string.Format("EXAMINE {0}", name);
            var command = new ImapCommand(text);
            var reader = SendAndReceive(command, false);

            var response = new SelectExamineImapResponse(mailboxName);
            response.Parse(reader);

            if (response.IsOk) {
                SelectedMailbox = mailboxName;
            }

            return response;
        }