Mandrill 的 Render API 会忽略映射到 Handlebars 变量的 merge_vars 吗?
Does Mandrill's Render API ignore merge_vars that map to Handlebars variables?
Mandrill 的 Template API page, I plug in the following JSON to test the Render 方法点击 "Try it":
{
"key": "MY VALID KEY",
"template_name": "test1",
"template_content": [
],
"merge_vars": [
{
"name": "invoice_number",
"content": "1001"
}
]
}
测试结果与我的模板一起返回,但我正在测试的 merge_var
尚未合并,即结果仍然包含 {{invoice_number}}
:
{
"html": "<p style=\"font-family: sans-serif;\">Dear Customer,</p>\r\n\r\n<p style=\"font-family: sans-serif;\">Invoice {{invoice_number}} ...</p>"
}
Mandrill 的 Render API 会忽略映射到 Handlebars 变量的 merge_vars
吗?
根据 Mandrill 的支持:
As you noticed, the render API call does not currently support
Handlebars templates. While I can't provide an exact ETA for when the
render API call will work with Handlebars, I can tell you that it's
something that our developers are working to extend support for very
soon.
I would suggest keeping an eye on our Mandrill API Documentation
as that support will be noted there as an additional parameter for the
call as soon as it is supported.
Mandrill 的 Template API page, I plug in the following JSON to test the Render 方法点击 "Try it":
{
"key": "MY VALID KEY",
"template_name": "test1",
"template_content": [
],
"merge_vars": [
{
"name": "invoice_number",
"content": "1001"
}
]
}
测试结果与我的模板一起返回,但我正在测试的 merge_var
尚未合并,即结果仍然包含 {{invoice_number}}
:
{
"html": "<p style=\"font-family: sans-serif;\">Dear Customer,</p>\r\n\r\n<p style=\"font-family: sans-serif;\">Invoice {{invoice_number}} ...</p>"
}
Mandrill 的 Render API 会忽略映射到 Handlebars 变量的 merge_vars
吗?
根据 Mandrill 的支持:
As you noticed, the render API call does not currently support Handlebars templates. While I can't provide an exact ETA for when the render API call will work with Handlebars, I can tell you that it's something that our developers are working to extend support for very soon.
I would suggest keeping an eye on our Mandrill API Documentation as that support will be noted there as an additional parameter for the call as soon as it is supported.