method

delete_all

v1_8_6_287 - Show latest stable - Class: Net::POP3
delete_all(# :yield: message)
public

Deletes all messages on the server.

If called with a block, yields each message in turn before deleting it.

Example

    n = 1
    pop.delete_all do |m|
      File.open("inbox/#{n}") do |f|
        f.write m.pop
      end
      n += 1
    end

This method raises a POPError if an error occurs.