Skip to content

Instantly share code, notes, and snippets.

@cubiic

cubiic/gmail.rb Secret

Created August 17, 2012 02:36
Show Gist options
  • Save cubiic/15a72402911368920903 to your computer and use it in GitHub Desktop.
Save cubiic/15a72402911368920903 to your computer and use it in GitHub Desktop.
require 'gmail'
gmail = Gmail.new(username, password)
while true
inbox = gmail.inbox.emails(:unread, :on => Date.today)
inbox.each do |email|
puts email.subject
end
sleep PERIOD
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment