Handler for Rails' ActionMailer to send emails through Mandrill.
In your Gemfile
:
gem 'mandrill-mailer-rails'
Store your API Key in an environment variable or other safe place. It needs access to at least the send
method.
In your config/application.rb
:
config.action_mailer.delivery_method = :mandrill
config.mandrill_action_mailer.api_key = ENV['MANDRILL_API_KEY']
Whether Mandrill should automatically insert a tracking image. Default: false
.
config.mandrill_action_mailer.track_opens = true
Whether Mandrill should override your URLs and track clicks. Default false
.
config.mandrill_action_mailer.track_clicks = true