Sends a SELECT command to select a mailbox so that messages in the mailbox can be accessed.
After you have selected a mailbox, you may retrieve the number of items in that mailbox from @responses[“EXISTS”][-1], and the number of recent messages from @responses[“RECENT”][-1]. Note that these values can change if new messages arrive during a session; see #add_response_handler() for a way of detecting this event.
A Net::IMAP::NoResponseError is raised if the mailbox does not exist or is for some reason non-selectable.
# File lib/net/imap.rb, line 434 def select(mailbox) synchronize do @responses.clear send_command("SELECT", mailbox) end end