-
Notifications
You must be signed in to change notification settings - Fork 583
Helpers missing array parameters. #382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hello @Nitro52, You may have run into this issue: https://github.com/sendgrid/sendgrid-csharp/blob/master/TROUBLESHOOTING.md#missing Also, this library is currently being rewritten in the v9beta branch and is near beta release, check out the progress here if you like: #331 (comment) We would love to hear your feedback :) With Best Regards, Elmer |
Hi @thinkingserious I had a look at the beta and it looks like you've solved this problem. SendGridMessage is the new replacement to the Mail class i assume? it seems a bit cleaner and allows you to add multiple recipients via the AddTos method. |
@thinkingserious one more comment about the new beta release, I noticed that it will support .net core. I had an issue with another library recently that meant i could not use nuget to install it. This was because it depended on System.Net.Http 4.0.x which. This version requires nuget 3.0 and if your using Visual Studio 2013 you can not upgrade nuget to 3.0. It seems you have the same dependency, So you will probably need VS 2015 + to manage the sendgrid dependency via nuget. Here is the original issue i had Jericho/StrongGrid#109 (comment) |
Yes, the new v9 of this library should help achieve your use case. With regards to the Nuget issue, could you please create a new issue here? Thanks! |
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 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:
The text was updated successfully, but these errors were encountered: