Method: Net::POP3.delete_all

Defined in:
lib/pop_ssl.rb

.delete_all(address, port = nil, account = nil, password = nil, isapop = false, &block) ⇒ Object

Starts a POP3 session and deletes all messages on the server. If a block is given, each POPMail object is yielded to it before being deleted.

This method raises a POPAuthenticationError if authentication fails.

Example

Net::POP3.delete_all('pop.example.com', 110,
                     'YourAccount', 'YourPassword') do |m|
  file.write m.pop
end


283
284
285
286
287
288
289
# File 'lib/pop_ssl.rb', line 283

def POP3.delete_all(address, port = nil,
                     = nil, password = nil,
                    isapop = false, &block)
  start(address, port, , password, isapop) {|pop|
    pop.delete_all(&block)
  }
end