Rails 获取邮箱中所有邮件

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

require 'net/pop'

mail_server = Net::POP3.new('mail.mailservernamehere.com')//连接
mail_server.start('username','password')//认证

mail_server.mails.each do |m|
  mail = m.pop
  puts mail
end