This post originated from an RSS feed registered with Ruby Buzz
by Eric Hodel.
Original Post: ar_mailer
Feed Title: Segment7
Feed URL: http://blog.segment7.net/articles.rss
Feed Description: Posts about and around Ruby, MetaRuby, ruby2c, ZenTest and work at The Robot Co-op.
Even deliviring email to the local machine may take too long when you have to
send hundreds of messages. ar_mailer allows you to store messages into the
database for later delivery by a separate process, ar_sendmail.
Installing ar_mailer
Just install the gem:
$ sudo gem install ar_mailer
Converting to ar_mailer
Go to your Rails project:
$ cd your_rails_project
Create a new migration:
$ ar_sendmail --create-migration
You'll need to redirect this into a file. If you want a different name provide the —table-name option.
Create a new model:
$ ar_sendmail --create-model
You'll need to redirect this into a file. If you want a different name provide the —table-name option.
Change your email classes to inherit from ActionMailer::ARMailer instead of ActionMailer::Base: