Guest User

Untitled

a guest
Apr 8th, 2018
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #!/usr/bin/ruby
  2.  
  3. require 'net/imap'
  4.  
  5. user = 'nokogiri@user-helfen-usern.de'
  6. pass = 'SUPERSECRETPASSWORD'
  7. folder = ['INBOX','1und1']
  8.  
  9. box = Net::IMAP.new('uhuc.de','993',true)
  10. box.authenticate('LOGIN', user, pass)
  11. folder.each do |dir|
  12. box.examine(dir)
  13. new = box.search(['RECENT']).count
  14. old = box.search(['NOT','NEW']).count
  15. puts "#{dir} \t#{new}/#{old}"
  16. end
  17.  
  18. box.logout()
Add Comment
Please, Sign In to add comment