String apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGridAPIClient(apiKey);
Email from = new Email("test@example.com");
String subject = "Hello World from the SendGrid CSharp Library";
Email to = new Email("test@example.com");
Content content = new Content("text/plain", "Textual content");
Mail mail = new Mail(from, subject, to, content);
dynamic response = sg.client.mail.send.post(requestBody: mail.Get());
Issue Summary
ASP.NET Web API 4.5.2 Application, sending email added c# libraries paste this code
Steps to Reproduce
Install dlls from nuget Install-Package SendGrid
added example code
String apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGridAPIClient(apiKey);
then this never gets a response, sometimes deliver messages
Technical details: