Reputation: 753
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
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
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