def message(mailbox, args = {}, &block)
      Message.new_local(connection, mailbox, args, &block)
    end
def message(mailbox, args = {}, &block)
      Message.new_local(connection, mailbox, args, &block)
    end
Factory

 Factories require an instance of Net::IMAP. Serveral methods are supported:

 Factory.new(:connection => connection)
 In this case, `connection` should be an authorized Net::IMAP instance.

 Factory.new(:server => "imap.gmail.com", :xoauth => [token, string])
 In this case we'll build a Net::IMAP instance and attempt to send a raw
 XOAUTH authentication request using the supplied token.

 Factory.new(:server => 'imap.example.com', :login => [username, password])
 In this case, we'll build a Net::IMAP instance and use the `#login` method
 to authenticate. This isn't the same as using 'LOGIN' as the auth method
 in the next example.

 Factory.new(:server => "imap.example.com", :authentication => [some_auth_method, appropriate, arguments])
 In this case, we'll build a Net::IMAP instance and attempt to authenticate
 with the value of `:authentication` by calling `Net::IMAP#authenticate`.
 Factory#message

 Constructs an Message

 `mailbox` can be either a string describing the Imap mailbox the message belongs to
 or an instance of Mailbox.

 `args` will be passed to ImapFactorY::Message#new_local - see that method for details