No commit activity in last 3 years
No release in over 3 years
Using the contactology gem, this library provides a Contactology::Mailer to provide simple integration with sending Contactology transactional campaigns.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

Contactology::Mailer

This library provides an ActionMailer-based hook into sending transactional campaigns through Contactology.

Example

    # 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

Installation is done through Rubygems with gem install contactology-mailer.

More information