Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Check a Gmail account for move notifications from Dragon Go Server (DGS) and sends a Prowl notification to my iPhone
require 'rubygems'
require 'gmail'
require 'prowl'
gmail = Gmail.new('eric.****@gmail.com', '****')
emails = gmail.inbox.emails(:unread, :from => "noreply@dragongoserver.net")
if emails.size > 0
email = emails.first
Prowl.add(
:apikey => '*****',
:application => "DGS",
:event => "New move",
:description => "A new DGS move is waiting !"
)
email.mark(:read)
email.archive!
end
gmail.logout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment