var sendGridClient = new SendGridClient(Environment.GetEnvironmentVariable("SendGridKey"));
var sendGridMessage = new SendGridMessage();
sendGridMessage.SetFrom("test@test.com", "John Doe");
sendGridMessage.AddTo("test2@test.com", "Jane Doe");
sendGridMessage.SetTemplateId("d-15481283818ccffee13cf88sdf3439f9");
sendGridMessage.SetTemplateData(JsonObject);
var response = sendGridClient.SendEmailAsync(sendGridMessage).Result;
Comments