Using the mail gem to delete all messages from your inbox

require 'mail'

Mail.defaults do
  retriever_method :pop3, { :address             => "mail.jamesrobertson.eu",
                            :port                => 110,
                            :user_name           => 'james',
                            :password            => '*********',
                            :enable_ssl          => false }
end

Mail.delete_all