I am having trouble adding an additional substitution for sending emails with Sendgrid C#. https://github.com/sendgrid/sendgrid-csharp/ For example how can I add one more substitution for -name- ? How can I do this? Thank you for your help.
Here is my code that is working fine for one substitution (email).
var emails = group.ToList();
List<string> subjects = new List<string>();
var substitutions = new List<Dictionary<string, string>>();
for (int i = 0; i < tos.Count; i++)
{
subjects.Add(subject);
substitutions.Add(new Dictionary<string, string>() { { "-email-", tos[i].Email } });
}
string plainTextContent = null;
string htmlContent = body;
var msg2 = MailHelper.CreateMultipleEmailsToMultipleRecipients(from,
emails,
subjects,
plainTextContent,
htmlContent,
substitutions
);