Good afternoon,
I'm trying to use sendgrid, but whenever I try to use a personalization I can not send, but when I remove the personalization I send it normally:
`
var client = new SendGridClient(apiKey);
var msg = new SendGridMessage()
{
From = new EmailAddress("[email protected]", "Equipe Easy"),
Subject = subject,
TemplateId = "d-ce99b65e0bed498fa6f83b715d2c10d7",
Personalizations = new List<Personalization>()
{
new Personalization()
{
Substitutions = new Dictionary<string, string>()
{
{"%linkConfirmacao%", link}
}
}
}
};
msg.AddTo(new EmailAddress(email));
return client.SendEmailAsync(msg);
}`
C# ASP.NET MV5 CORE 2;0
Hi there,
When sending with Dynamic Templates, you'll have to use the parameter dynamic_template_data for all substitutions and Handlebar logic. If you're using the Legacy Templates, you can use the above call. Here is our documentation on using Dynamic Template Data.
Hello @matheusdelre,
Please update this SDK to version 9.10.0 and see this example.
Thanks!
With Best Regards,
Elmer