Guest User

Untitled

a guest
Sep 11th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #!/usr/bin/env ruby
  2. require 'gmail'
  3.  
  4. throw "Wojtek nie psuj" if ARGV.length < 3
  5.  
  6. username = ARGV[0]
  7. password = ARGV[1]
  8. from = ARGV[2]
  9.  
  10. Gmail.connect(username, password) do |gmail|
  11. mails = gmail.inbox.emails(:read, :from => from)
  12. mails.map{|mail| puts; puts mail.body}
  13. end
Add Comment
Please, Sign In to add comment