Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Deliver email to local db and have it send by sequel_sendmail later. Attempt at a clone of ar_mailer for merb + sequel.
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
lib
spec
.gitignore
LICENSE
README
Rakefile
TODO

README

sequel_mailer
=============

My attempt at a clone of ar_mailer (http://seattlerb.rubyforge.org/ar_mailer/) for Merb 0.9.1+ and the Sequel ORM.

Status
=============
The plugin can be used in your merb app, but there's nothing to send the mail yet.


Using
=============
+ Create the migration for your model (Assumes model will be named Email):

class EmailMigration < Sequel::Migration
  def up
    create_table "emails" do
      primary_key :id
      varchar :from_address
      varchar :to_address
      varchar :last_send_attempt, :default => 0
      text    :mail
      datetime :created_on
    end
  end

  def down
    execute "DROP TABLE emails"
  end
end


+ Set the delivery_method and class to be used:

Merb::Mailer.delivery_method = :sequel
Merb::Mailer.config = {:sequel_mailer_class => Email}

+ Enjoy


TODO
=============
+ Write specs for the mailer
+ Write the sequel_sendmail daemon
+ Write a generator for the migration and setting the config
Something went wrong with that request. Please try again.