Introducing the Classic_omah gem

require 'classic_omah'

mail = {
        user_name: 'james', 
        address: 'mail.jamesrobertson.eu',
        password: 'secret'
       }

comah = ClassicOmah.new mail: mail, sps: {address: 'sps', port: 59000}
comah.fetch_email

The above example demonstrates how I fetch the email from my email server. Classic_omah does the following:

  1. connects to your email server using the Mail gem
  2. retrieves all messages in 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