Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env ruby
- require 'gmail'
- throw "Wojtek nie psuj" if ARGV.length < 3
- username = ARGV[0]
- password = ARGV[1]
- from = ARGV[2]
- Gmail.connect(username, password) do |gmail|
- mails = gmail.inbox.emails(:read, :from => from)
- mails.map{|mail| puts; puts mail.body}
- end
Add Comment
Please, Sign In to add comment