Description
Issue Summary
The helper classes do not provide an public interface that matches the api documentation.
Steps to Reproduce
In the code sample we use the following lines
` string apiKey = Environment.GetEnvironmentVariable("NAME_OF_THE_ENVIRONMENT_VARIABLE_FOR_YOUR_SENDGRID_KEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGridAPIClient(apiKey);
Email from = new Email("[email protected]");
string subject = "Hello World from the SendGrid CSharp Library!";
Email to = new Email("[email protected]");
Content content = new Content("text/plain", "Hello, Email!");
Mail mail = new Mail(from, subject, to, content);
dynamic response = await sg.client.mail.send.post(requestBody: mail.Get());`
Email represents a single recipient or sender. Mail represents a the actual message being sent. Mail only has 2 constructors though. A default constructor and this one
public Mail(Email from, string subject, Email to, Content content)
But a message can be sent to multiple recipients. The API documentation represents to as an Array of Email. It seems like the Mail class should contain a constructor overload that takes an array of email instead of one?
Also have you thought about having a constructor overload that takes a .net System.Net.Mail.MailMessage type? not sure what the pros/cons would be though
Technical details:
- sendgrid-csharp Version: master (latest commit: [commit number])
- .NET Version: 4.5.2