2
votes

I exported a Mailchimp's template to Mandrill. template has a native Mailchimp merge var like this:

 *|LIST:COMPANY|*

I want to set a value manually to this merge var using the official Mandrill API PHP wrapper. using function sendTemplate(....) I tried:

'global_merge_vars' => array(array(
  'name' => 'LIST:COMPANY',
  'content' => 'my company name'
))

or

'X-MC-MergeVars' => array('{"LIST:COMPANY":"my company name"}')

or in the second parameter of sendTemplate() function:

array(array(
  'name' => 'LIST:COMPANY',
  'content' => 'my company name'
))

but none of them works. there is a way to do this? regards

1

1 Answers

2
votes

It looks like the colon in the merge tag from MailChimp isn't supported in Mandrill. I was able to get this to work by removing the colon and replacing it with a supported character like an underscore, i.e. LIST_COMPANY.