pop.rb is the new Ruby 1.9 version
require 'pop_ssl' # I renamed the file from pop.rb to pop_ssl.rb to ensure I was requiring the correct version
username = 'YOUR_GMAIL_USERNAME@gmail.com'
password = 'YOUR_GMAIL_PASSWORD'
Net::POP3.start('pop.gmail.com', 995, username, password) do |pop|
puts 'No mail.'
pop.each_mail do |mail|