{"action":"created","issue":{"url":"https://api.github.com/repos/sendgrid/sendgrid-csharp/issues/245","repository_url":"https://api.github.com/repos/sendgrid/sendgrid-csharp","labels_url":"https://api.github.com/repos/sendgrid/sendgrid-csharp/issues/245/labels{/name}","comments_url":"https://api.github.com/repos/sendgrid/sendgrid-csharp/issues/245/comments","events_url":"https://api.github.com/repos/sendgrid/sendgrid-csharp/issues/245/events","html_url":"https://github.com/sendgrid/sendgrid-csharp/issues/245","id":161039753,"number":245,"title":"Can't seem to get things started with Microsoft's Tutorial due to API change","user":{"login":"charles-smith","id":20009016,"avatar_url":"https://avatars.githubusercontent.com/u/20009016?v=3","gravatar_id":"","url":"https://api.github.com/users/charles-smith","html_url":"https://github.com/charles-smith","followers_url":"https://api.github.com/users/charles-smith/followers","following_url":"https://api.github.com/users/charles-smith/following{/other_user}","gists_url":"https://api.github.com/users/charles-smith/gists{/gist_id}","starred_url":"https://api.github.com/users/charles-smith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charles-smith/subscriptions","organizations_url":"https://api.github.com/users/charles-smith/orgs","repos_url":"https://api.github.com/users/charles-smith/repos","events_url":"https://api.github.com/users/charles-smith/events{/privacy}","received_events_url":"https://api.github.com/users/charles-smith/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sendgrid/sendgrid-csharp/labels/type:%20question","name":"type: question","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-06-18T19:28:06Z","updated_at":"2016-06-19T15:34:13Z","closed_at":null,"body":"I'm not sure what's causing this, but I keep on getting a BadRequest when I try and send an email. Any ideas?\r\n\r\n#### Issue Summary\r\n\r\nNot able to send mail after following directions. Combining new API + [Microsoft's existing tutorial](http://docs.asp.net/en/latest/security/authentication/accconfirm.html#require-email-confirmation).\r\n\r\n#### Steps to Reproduce\r\n\r\nFollow Microsoft's steps up till the SendEmailAsync method. Replace that with the following:\r\n\r\n        public Task SendEmailAsync(string email, string subject, string message)\r\n        {\r\n            var apiKey = Environment.GetEnvironmentVariable(\"SENDGRID_APIKEY\");\r\n            dynamic sendGrid = new SendGridAPIClient(apiKey);\r\n\r\n            Email from = new Email(\"email@address.com\");\r\n            Email to = new Email(email);\r\n            Content content = new Content(\"text/html\", message);\r\n            Mail mail = new Mail(from, subject, to, content);\r\n\r\n            dynamic response = sendGrid.client.mail.send.post(requestBody: mail.Get());\r\n\r\n            return Task.FromResult(0);\r\n        }\r\n\r\n#### Results\r\n\r\n    response.StatusCode = BadRequest\r\n    response.Headers {Connection: keep-alive\r\n        X-Frame-Options: DENY\r\n        Date: Sat, 18 Jun 2016 19:24:02 GMT\r\n        Server: nginx\r\n    }\tSystem.Net.Http.Headers.HttpResponseHeaders\r\n\r\n#### Technical details:\r\n\r\n* sendgrid-csharp Version: Sendgrid 7.0.2\r\n* .NET Version: 4.6"},"comment":{"url":"https://api.github.com/repos/sendgrid/sendgrid-csharp/issues/comments/227003572","html_url":"https://github.com/sendgrid/sendgrid-csharp/issues/245#issuecomment-227003572","issue_url":"https://api.github.com/repos/sendgrid/sendgrid-csharp/issues/245","id":227003572,"user":{"login":"thinkingserious","id":146695,"avatar_url":"https://avatars.githubusercontent.com/u/146695?v=3","gravatar_id":"","url":"https://api.github.com/users/thinkingserious","html_url":"https://github.com/thinkingserious","followers_url":"https://api.github.com/users/thinkingserious/followers","following_url":"https://api.github.com/users/thinkingserious/following{/other_user}","gists_url":"https://api.github.com/users/thinkingserious/gists{/gist_id}","starred_url":"https://api.github.com/users/thinkingserious/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thinkingserious/subscriptions","organizations_url":"https://api.github.com/users/thinkingserious/orgs","repos_url":"https://api.github.com/users/thinkingserious/repos","events_url":"https://api.github.com/users/thinkingserious/events{/privacy}","received_events_url":"https://api.github.com/users/thinkingserious/received_events","type":"User","site_admin":false},"created_at":"2016-06-19T15:34:13Z","updated_at":"2016-06-19T15:34:13Z","body":"@charles-smith,\r\n\r\nPlease replace ' with \\\"\r\n\r\nSo `<a href='https://localhost:44381/Account/ConfirmEmail?userId=136f33aa-62c2-40c5-9b63-f5eb6042ab19&code=CfDJ8A5ORVBZiNBKsxddZkx8SA5qO7Neyc1j9CkXLXy%2BdOFabvXplQt2CwoQ2t2JcFfaMVb1FNlW3nZNVapkjJ81Bxltc9vAljHlha8iKzwic%2B5d2uCLjGGTuu9xUoCIarmcm6lClrmJcOi3x4qeHSTNVSZIuRz%2B8ATUROVVkI1o00oSHArSdL6IobdPaAVz%2BqcS514ob5uVvfij8ETQWB1W%2Fe1SGgKN9yGgMePxrYd%2Fy3HoRz51l240fFL2WPpt2hDeMg%3D%3D'>` \r\n\r\nbecomes \r\n\r\n`<a href=\\\"https://localhost:44381/Account/ConfirmEmail?userId=136f33aa-62c2-40c5-9b63-f5eb6042ab19&code=CfDJ8A5ORVBZiNBKsxddZkx8SA5qO7Neyc1j9CkXLXy%2BdOFabvXplQt2CwoQ2t2JcFfaMVb1FNlW3nZNVapkjJ81Bxltc9vAljHlha8iKzwic%2B5d2uCLjGGTuu9xUoCIarmcm6lClrmJcOi3x4qeHSTNVSZIuRz%2B8ATUROVVkI1o00oSHArSdL6IobdPaAVz%2BqcS514ob5uVvfij8ETQWB1W%2Fe1SGgKN9yGgMePxrYd%2Fy3HoRz51l240fFL2WPpt2hDeMg%3D%3D\\\">`\r\n\r\nPlease let me know if that works for you (appears it works for me) and I'll ask our team if we get a better error message.\r\n\r\nThanks!"}}
{"actor":{"display_login":"thinkingserious"}}