Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

Mailman – Like Sinatra for E-mail

By Peter Cooper / July 28, 2010

Mailman is an incoming email processing microframework. You point it at a source of email, such as a POP3 account or a Maildir, and it will execute routes based on the messages that come in.

For instance if you had a ticketing system, and wanted to add replies via email to the database, this application would be a good start:

require 'mailman'

Mailman.config.maildir = '~/Maildir'

Mailman::Application.new do
  to 'ticket-%id%@vipsupport.com' do

    Ticket.find(params[:id]).add_reply(message)
  end
end

Jonathan Rudenberg

This is very nice. I love these microframeworks. The Sinatra style is always good to ape.

Comments

  1. Michael Kohl says:

    This looks like a great project, but it's also an absolute naming fail.

Other Posts to Enjoy

Twitter Mentions