I'm trying to insert a dynamical variable into the subject line via this library.
For example: "Hello {{name}}, welcome to {{store_name}}"
My email sends off no problem, but the subject renders {{name}} and {{store_name}} as... just that. No variables are inserted.
Code example:
dynamic_template_data: {
name: "John",
store_name: "My store",
subject: "Hello {{name}}, welcome to {{store_name}}!"
}
In my template within Sendgrid UI, the subject value is: {{subject}} I've also tried: {{{subject}}} but no go.
Email is sent and the subject line is... Hello {{name}}, welcome to {{store_name}}
When it should be... Hello John, welcome to My store!