End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Net::POP3.start
start(address, port = nil, account = nil, password = nil, isapop = false) { |pop| ... }
lib/net/pop.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/net/pop.rb, line 401
def POP3.start(address, port = nil,
account = nil, password = nil,
isapop = false, &block) # :yield: pop
new(address, port, isapop).start(account, password, &block)
end
Creates a new POP3 object and open the connection. Equivalent to
Example
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
Example
Net::POP3.start(addr, port, account, password) do |pop| pop.each_mail do |m| file.write m.pop m.delete end end