Search code examples
mailchimpmandrill

Is it possible to use nested merge tags in Mandrill?


Is it possible to use nested merge tags?

What we need is to be able to define the UNSUB tag depending on the values from other merge tags, like on this example:

<a 
href="*|UNSUB:*|COMMUNITYURL|*/site/unsuscribe/user_id/*|USERID|*/hash/*|HASH|*/type/all|*">
Unsubscribe
</a>

Is this correct? Should be done in a different way?


Solution

  • It's not currently possible to nest merge tags. In this case, your best bet would be to add your own List-Unsubscribe headers (using the headers parameter in the API) and pass either your own URL, or a URL constructed with your merge tags but not the UNSUB merge tag.