Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

An ActionMailer integration to Contactology transactional campaigns

branch: develop

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 README.markdown
Octocat-spinner-32 Rakefile
Octocat-spinner-32 contactology-mailer.gemspec
README.markdown

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

Something went wrong with that request. Please try again.