start

start(address, port = nil, account = nil, password = nil, isapop = false)
Class Public methods

Creates a new POP3 object and open the connection. Equivalent to

Net::POP3.new(address, port, isapop).start(account, password)

If block is provided, yields the newly-opened POP3 object to it, and automatically closes it at the end of the session.

Example

Net::POP3.start(addr, port, account, password) do |pop|
  pop.each_mail do |m|
    file.write m.pop
    m.delete
  end
end
doc_ruby_on_rails
2015-04-22 05:31:42
Comments
Leave a Comment

Please login to continue.