# config/initializers/contactology.rb Contactology.key = 'MyContactologyApiKey' # app/mailers/user_mailer.rb class UserMailer < Contactology::Mailer def welcome(user) # Sets the transactional campaign recipients recipients user.email # Sets the "replacements" for the campaign body :user_name => user.name, :email => user.email end end # Sends via a Contactology "welcome" transaction campaign. # The "welcome" campaign would be created through another means. UserMailer.deliver_welcome(User.first)
Installation is done through Rubygems with
gem install contactology-mailer.