domanskyi
domanskyi

Reputation: 753

SendGrid Dynamic Templates - get recipient email in handlebars

In my SendGrid dynamic template, I need to get the recipient email and pass it in the URL. Is there any way I can the recipient email from some sort of global/default variables, or I will need to pass it with the payload?

Upvotes: 0

Views: 731

Answers (2)

Philip Pryde
Philip Pryde

Reputation: 940

Leaving this here for the next person looking.

You can get this via handlebar keywords Sendgrid provides if you are using Sendgrid Contacts

ex. {{email}} will substitute the to address of the contact in the template.

Upvotes: 0

philnash
philnash

Reputation: 73057

You need to pass all the data that you want to use within the body of an email template in the dynamic template data.

Upvotes: 1

Related Questions