Skip to content
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

Hard-coded subject in mail helper #234

Closed
digime99 opened this issue Jun 14, 2016 · 5 comments
Closed

Hard-coded subject in mail helper #234

digime99 opened this issue Jun 14, 2016 · 5 comments
Labels
type: bug bug in the library

Comments

@digime99
Copy link

Please see sendgrid-csharp/SendGrid/SendGrid/Helpers/Mail/Mail.cs

  public Mail(Email from, String subject, Email to, Content content)
        {
            this.From = from;
            Personalization personalization = new Personalization();
            personalization.AddTo(to);
            this.AddPersonalization(personalization);
            **this.Subject = "Hello World from the SendGrid CSharp Library";**
            this.AddContent(content);
        }

Should be this...

this.Subject = subject;

@ncruces
Copy link

ncruces commented Jun 15, 2016

Not only is the API awful, but it is full of blunders such as this.

Who's idea was it to make a C# API full of:

  • dynamic;
  • snake_cased members, that violate every naming convention of the language;
  • stuff not amenable to async/await;
  • built on "helper classes" like Mail that make it impossible to use object/collection initializers.

How is this _at all helpful_ as a C# API?

For now I'll just revert, but if this is the "future", I'll be wrapping the REST API directly through something like Refit.

@thinkingserious
Copy link
Contributor

@digime99 my apologies, I will be fixing that issue shortly. Thank you very much for letting us know!

@ncruces thanks for the specific feedback, it is much appreciated! We rewrote the library to support all v3 web api endpoints and the highly anticipated v3 /mail/send endpoint. This is a starting point and we are listening carefully and will update accordingly. After fixing the bug reported in this ticket, I'll create new tickets to address the other issues you mention. Hopefully we can then dig into the details and continue improvement.

@thinkingserious thinkingserious added the type: bug bug in the library label Jun 15, 2016
@thinkingserious
Copy link
Contributor

@digime99 this has been fixed in version 7.0.1: https://www.nuget.org/packages/SendGrid

@critot
Copy link

critot commented Jun 16, 2016

totally agree with ncruces, a full step back!

@thinkingserious
Copy link
Contributor

Hello @critot,

You are correct, this is a full step back, possibly more :)

We would love to have your feedback as we move forward. I'm going to break down ncruces' feedback into separate GitHub issues with specific action items. Your vote and/or comments will matter. In the next few weeks we are taking a strategic step back to determine what the next milestone will be for this library. A major factor will be your feedback along with the rest of the community. Our goal is build this library collaboratively with this community so that it can best serve your needs (generically through the core library and more specifically through helpers). We can only do that if your specific concerns are voiced.

Another point of feedback we would love to learn from is regarding the best way to communicate with this community. We announced the beta back in May, but did not receive much feedback. We hope this changes moving forward. I am heartened by the recent feedback though, we have passionate developers in this community who care as much as we do about this library :)

For now, if you don't want to jump into this version of the library, you can still use v6.3.4: https://www.nuget.org/packages/Sendgrid/6.3.4

gabrielkrell pushed a commit to gabrielkrell/sendgrid-csharp that referenced this issue Aug 2, 2017
Substitutions allow non-strings for values
gabrielkrell pushed a commit to gabrielkrell/sendgrid-csharp that referenced this issue Aug 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug bug in the library
Projects
None yet
Development

No branches or pull requests

4 participants