Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue when trying to send variables for template language v3.1 #43

Closed
nemanjapetrovic opened this issue Nov 2, 2017 · 2 comments
Closed

Comments

@nemanjapetrovic
Copy link

Hi guys,

I have an issue sending template variables with v3.1 API:

So here it is:
I have template stored on your website with button HTML like:

<center>
    <a href="{{ var:userVerificationLink:"www.google.com" }}" class="btn-verify">
       Verify Address
    </a>
</center>

And I am sending API (v3.1, nodejs, npm:"node-mailjet": "3.2.1") request like this one:

"Messages ": [{
	"From ": {
		"Email ": "example@example.com",
		"Name ": "Some name"
	},
	"To": [{
		"Email ": "second@second.com",
		"Name ": "Some second"
	}],
	"TemplateID ": 1,
	"Variables": {
		"userVerificationLink": "http://localhost:8080/verify"
	}
}]

And my button in received HTML doesn't have at all href link, is there something else to add to this API call or?

@eboisgon
Copy link
Contributor

eboisgon commented Nov 3, 2017

Hello Nemanjapetrovic,

In your message, you seem to be missing the following
"TemplateLanguage": true,
This will indicate to the API that you want the template language to be processed.
By default the processing is turned off.

You can check here for more information

Hope it helps

@nemanjapetrovic
Copy link
Author

@eboisgon

Yap, that was the problem. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants