Mandrill DM allows you to use ActionMailer with the Mandrill API. Created by Jonathan Berglund and maintained by John Dell, and Kirill Shnurov and a various contributors.
First, add the gem to your Gemfile and run the bundle command to install it.
gem 'mandrill_dm'Second, set the delivery method in config/environments/production.rb.
config.action_mailer.delivery_method = :mandrillThird, create an initializer such as config/initializers/mandrill.rb and paste in the following code:
MandrillDm.configure do |config|
config.api_key = ENV['MANDRILL_APIKEY']
endNOTE: If you don't already have an environment variable for your Mandrill API key, don't forget to create one.
Questions or problems? Please use the issue tracker. If you would like to contribute to this project, fork this repository. Pull requests appreciated.
This gem was inspired by the letter_opener and mandrill-delivery-handler gems. Special thanks to the folks at MailChimp and Mandrill for their Starter service and Ruby API.