Introducing the Gmail_omah gem

require 'gmail_omah'

mail = {user_name: 'somebody@gmail.com', password: 'secretpassword'}

gomah = GmailOmah.new mail: mail, sps: {address: 'sps', port: 59000}
gomah.fetch_email


The above example demonstrates how I fetch email messages from Gmail. Gmail_omah does the following:

  1. connects to Gmail using the Gmail gem
  2. retrieves all messages from the inbox
  3. stores the messages in a file directory called email
  4. deletes all messages from the inbox
  5. publishes an SPS message to announce new email has been received.

Resources