I need to fetch email from my gmail account using RoR.
require \'net/pop\' Net::POP3.start(\'pop.gmail.com\', 995, username, password) do |pop| if pop.mai
Try this one:
require 'net/pop' Net::POP3.enable_ssl(OpenSSL::SSL::VERIFY_NONE) Net::POP3.start('pop.gmail.com', 995, username, password) do |pop| if pop.mails.empty? puts 'No mails.' else pop.each_mail do |mail| p mail.header p mail.pop end end end