require'net/pop'pop=Net::POP3.new('pop3.example.com')pop.start('YourAccount','YourPassword')ifpop.mails.empty?puts'Nomail.'elsei=0pop.each_maildo|m|File.open("inbox/#{i}",'w')do|f|f.writem.popendm.deletei+=1endputs"#{pop.mails.size}mailspopped...
查看全文