I use mailgun with nodejs and want to use one of their custom templates.
// using template
var resetlink = 'https://myurl.com/reset/dkadlkw334sada';
var dataMail = {
from: 'Me <me@me.com>',
to: 'mail@gmail.com',
subject: 'password reset',
template: "pwrecovery",
"v:link":resetlink
};
// execute send
mg.messages().send(dataMail, function(error, body) {
if (error) {
}
console.log(body);
});
This works fine and I can see the mail delivered with this variable in the log console of mailgun.
However, I need this link inside the email template. I tried
<td class="em_white" height="42" align="center" valign="middle" style="font-family: Arial, sans-serif; font-size: 16px; color:#ffffff; font-weight:bold; height:42px;"><a href=%recipient.link% target="_blank" style="text-decoration:none; color:#ffffff; line-height:42px; display:block;">RESET YOUR PASSWORD</a></td>
and as well:
<p> the link: {{recipient-variables.link}} </p>
But none of that worked. How can I access and show this variable, the resetlink, inside the html template?