Mandrill API Templating Mandrill API Templating heroku heroku

Mandrill API Templating


You need to construct a hash for each element you're trying to replace. For instance, I have this inside of a template:

   <h3 mc:edit="plan_info_name"> </h3>   <span mc:edit="plan_info_description"> </span>   <span mc:edit="plan_info_benefits"> </span>

And this on the mailer:

mandrill.messages.send_template(template,[    {     :name => 'plan_info_name',     :content => extra[:membership_info].name    },    {     :name => 'plan_info_description',     :content => extra[:membership_info].long_description       },    {     :name => 'plan_info_benefits',     :content => benefits_list     }  ....