Bruce Lin
Bruce Lin

Reputation: 2740

Integrating rails with mailchimp

Currently I'm planning to use Mandrill and Mailchimp instead of ActionMailer. I created a template on Mailchimp, but confused what should be the next step? Basically I have two questions:

  1. How to send mail on Rails using the template on Mailchimp? In Actionmailer we can just use

    SomeMailTemplate.deliver()

    but how should this work in mailchimp if I want to deliver a specific template?

  2. How to pass in dynamically generated parameters? I saw Mailchimp has 'merge tag' that could
    handle this but didn't find very clear document about how to pass the parameters and how the email template is going to catch it.

Thanks!

Upvotes: 1

Views: 2764

Answers (1)

aarti
aarti

Reputation: 2865

Have you looked at their gems

https://github.com/mailchimp

They have examples as well

https://github.com/mailchimp/mcapi2-ruby-examples

Also from their docs http://apidocs.mailchimp.com/api/downloads/#ruby-rails

I have used the merge tag using their api, look at the examples.

Upvotes: 1

Related Questions