Answers for "How to substitute Sendgrid template variables? c#"

C#
0

How to substitute Sendgrid template variables? c#

var client = new SendGridClient(ApiKey);

            var dynamicTemplateData = new Dictionary<string, string>
            {
                {"first_name", "John"},
                {"last_name", "Snow"},
            };

            var msg = MailHelper.CreateSingleTemplateEmail(
                new EmailAddress("[email protected]"),
                new EmailAddress("[email protected]"),
                "d-template-id",
                dynamicTemplateData);


            var response = await client.SendEmailAsync(msg);
Posted by: Guest on July-08-2021

C# Answers by Framework

Browse Popular Code Answers by Language