Skip to content

bbwharris/mailchimp_subscriber

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

USAGE:

class User < ActiveRecord::Base
  subscribe_to "List Name", :using => { :api_key => MAILCHIMP_API_KEY,
                                        :email => :email, 
                                        :fields => {:FNAME => :first_name, :LNAME => :last_name}}
end

When User is saved, it will be added to your MailChimp list “List Name”.

This assumes that you have @user.email, @user.first_name, @user.last_name setup as your models attributes. MailChimp expects FNAME, and LNAME, you can also specify any custom fields and they will be captured.

When User is deleted it will automatically be unsubscribed from “List Name”.

REQUIREMENTS:

  • hominid gem

INSTALL:

gem 'hominid'
gem 'mailchimp_subscriber'

LICENSE:

BSD License

About

An easy way to add subscribers to your mail chimp lists

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages