kajacx
kajacx

Reputation: 12939

Mandrill: merge_vars not working

I'm working on sending diffenrent links to user emails via Mandrill 'merge_vars' but it is not working. Relevant parts from API log:

"message": {
    "preserve_recipients": false,
    "auto_text": false,
    "auto_html": false,
    "to": [
        {
            "email": "[email protected]"
        }
    ],
    "html": "... link: *|REFUSELINK|* ...",
    "text": "... link: *|REFUSELINK|* ...",
    "merge": true,
    "merge_language": "mailchimp",
    "merge_vars": [
        {
            "recipient": "[email protected]",
            "vars": [
                {
                    "name": "refuselink",
                    "content": "http://myLink.com"
                }
            ]
        }
    ]
},
"key": "myKey"

I receive the email correctly, but I see the original *|REFUSELINK|* instead of the desired replacement. Any idea what I'm doing wrong?

Upvotes: 0

Views: 719

Answers (1)

kajacx
kajacx

Reputation: 12939

Ups, it's rcpt, not recipient:

"merge_vars": [
    {
        "rcpt": "[email protected]", /* <-- here */
        "vars": [
            {
                "name": "refuselink",
                "content": "http://myLink.com"
            }
        ]
    }
]

Upvotes: 3

Related Questions