{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/comments/82237631","pull_request_review_id":3159243,"id":82237631,"diff_hunk":"@@ -0,0 +1,276 @@\n+// Licensed to the .NET Foundation under one or more agreements.\n+// The .NET Foundation licenses this file to you under the MIT license.\n+// See the LICENSE file in the project root for more information.\n+\n+using System.Security;\n+using System.Security.Permissions;\n+\n+namespace System.Net.Mail\n+{\n+    public enum SmtpAccess { None = 0, Connect = 1, ConnectToUnrestrictedPort = 2 };\n+\n+    [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Assembly, AllowMultiple = true, Inherited = false)]\n+    [Serializable]\n+    public sealed class SmtpPermissionAttribute : CodeAccessSecurityAttribute\n+    {\n+        private const string strAccess = \"Access\";\n+        private string _access = null;\n+\n+        public SmtpPermissionAttribute(SecurityAction action) : base(action)\n+        {\n+        }\n+\n+        public string Access\n+        {\n+            get\n+            {\n+                return _access;\n+            }\n+            set\n+            {\n+                _access = value;\n+            }\n+        }\n+\n+        public override IPermission CreatePermission()\n+        {\n+            SmtpPermission perm = null;\n+            if (Unrestricted)\n+            {\n+                perm = new SmtpPermission(PermissionState.Unrestricted);\n+            }\n+            else\n+            {\n+                perm = new SmtpPermission(PermissionState.None);\n+                if (_access != null)\n+                {\n+                    if (0 == string.Compare(_access, \"Connect\", StringComparison.OrdinalIgnoreCase))","path":"src/System.Net.Mime/src/System/Net/Mail/SmtpPermission.cs","position":47,"original_position":47,"commit_id":"44ac8f19b6d7fd6897237a93935be75b8318a8e3","original_commit_id":"44ac8f19b6d7fd6897237a93935be75b8318a8e3","user":{"login":"justinvp","id":710598,"avatar_url":"https://avatars.githubusercontent.com/u/710598?v=3","gravatar_id":"","url":"https://api.github.com/users/justinvp","html_url":"https://github.com/justinvp","followers_url":"https://api.github.com/users/justinvp/followers","following_url":"https://api.github.com/users/justinvp/following{/other_user}","gists_url":"https://api.github.com/users/justinvp/gists{/gist_id}","starred_url":"https://api.github.com/users/justinvp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinvp/subscriptions","organizations_url":"https://api.github.com/users/justinvp/orgs","repos_url":"https://api.github.com/users/justinvp/repos","events_url":"https://api.github.com/users/justinvp/events{/privacy}","received_events_url":"https://api.github.com/users/justinvp/received_events","type":"User","site_admin":false},"body":"Nit: `string.Equals`","created_at":"2016-10-06T17:13:24Z","updated_at":"2016-10-06T17:13:24Z","html_url":"https://github.com/dotnet/corefx/pull/12416#discussion_r82237631","pull_request_url":"https://api.github.com/repos/dotnet/corefx/pulls/12416","_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/comments/82237631"},"html":{"href":"https://github.com/dotnet/corefx/pull/12416#discussion_r82237631"},"pull_request":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/12416"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/12416","id":88201676,"html_url":"https://github.com/dotnet/corefx/pull/12416","diff_url":"https://github.com/dotnet/corefx/pull/12416.diff","patch_url":"https://github.com/dotnet/corefx/pull/12416.patch","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/12416","number":12416,"state":"open","locked":false,"title":"Initial commit to System.Net.Mime.","user":{"login":"Priya91","id":7853870,"avatar_url":"https://avatars.githubusercontent.com/u/7853870?v=3","gravatar_id":"","url":"https://api.github.com/users/Priya91","html_url":"https://github.com/Priya91","followers_url":"https://api.github.com/users/Priya91/followers","following_url":"https://api.github.com/users/Priya91/following{/other_user}","gists_url":"https://api.github.com/users/Priya91/gists{/gist_id}","starred_url":"https://api.github.com/users/Priya91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Priya91/subscriptions","organizations_url":"https://api.github.com/users/Priya91/orgs","repos_url":"https://api.github.com/users/Priya91/repos","events_url":"https://api.github.com/users/Priya91/events{/privacy}","received_events_url":"https://api.github.com/users/Priya91/received_events","type":"User","site_admin":false},"body":"Changes from Desktop implementation:\r\n- SmtpConnection uses TcpClient instead of ServicePointManager.\r\n- SslStream instead of internal TlsStream.\r\n- Negotiate, NTLM, Digest authentication protocols not ported due to\r\n  dependency on internal NTAuthentication type. Authentication currently happens uses plain text login, SSL connections need to be used.\r\n- TcpClient connections are not pooled.\r\n- Getting mail settings from `web.config` files is not supported, as netstandard2.0 doesn't expose the `System.Net.Configuration` apis.\r\n- Sending mail to IIS pickup directory currently throws `NotSupportedException`. Desktop uses COM types for this API, investigation on partially supporting this feature on Windows is pending.\r\n\r\nNotes:\r\n- Tests will be added separately.\r\n- Please review `SmtpConnection.cs` and `TlsStream.cs` files for correctness, they have changed functionally from Desktop code.\r\n- The TcpClient connect does not have `Connect()`, `BeginConnect()` and `EndConnect()` in .NET Core contract yet, once that's available, the SendAsync should use the async connect methods.\r\n\r\nDid a test locally using the ```SmtpClient.Send()``` and ```SmtpClient.SendAsync()``` , was able to successfully send emails to google smpt server with tls authentication.\r\n\r\ncc @stephentoub @ericeil @CIPop @davidsh @geoffkizer @tijoytom @karelz ","created_at":"2016-10-06T05:41:45Z","updated_at":"2016-10-06T17:13:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e35201c7373c9288f1f95a41f77cbc9ad3fcffc6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/corefx/pulls/12416/commits","review_comments_url":"https://api.github.com/repos/dotnet/corefx/pulls/12416/comments","review_comment_url":"https://api.github.com/repos/dotnet/corefx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/12416/comments","statuses_url":"https://api.github.com/repos/dotnet/corefx/statuses/44ac8f19b6d7fd6897237a93935be75b8318a8e3","head":{"label":"Priya91:addinmime","ref":"addinmime","sha":"44ac8f19b6d7fd6897237a93935be75b8318a8e3","user":{"login":"Priya91","id":7853870,"avatar_url":"https://avatars.githubusercontent.com/u/7853870?v=3","gravatar_id":"","url":"https://api.github.com/users/Priya91","html_url":"https://github.com/Priya91","followers_url":"https://api.github.com/users/Priya91/followers","following_url":"https://api.github.com/users/Priya91/following{/other_user}","gists_url":"https://api.github.com/users/Priya91/gists{/gist_id}","starred_url":"https://api.github.com/users/Priya91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Priya91/subscriptions","organizations_url":"https://api.github.com/users/Priya91/orgs","repos_url":"https://api.github.com/users/Priya91/repos","events_url":"https://api.github.com/users/Priya91/events{/privacy}","received_events_url":"https://api.github.com/users/Priya91/received_events","type":"User","site_admin":false},"repo":{"id":27062349,"name":"corefx-1","full_name":"Priya91/corefx-1","owner":{"login":"Priya91","id":7853870,"avatar_url":"https://avatars.githubusercontent.com/u/7853870?v=3","gravatar_id":"","url":"https://api.github.com/users/Priya91","html_url":"https://github.com/Priya91","followers_url":"https://api.github.com/users/Priya91/followers","following_url":"https://api.github.com/users/Priya91/following{/other_user}","gists_url":"https://api.github.com/users/Priya91/gists{/gist_id}","starred_url":"https://api.github.com/users/Priya91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Priya91/subscriptions","organizations_url":"https://api.github.com/users/Priya91/orgs","repos_url":"https://api.github.com/users/Priya91/repos","events_url":"https://api.github.com/users/Priya91/events{/privacy}","received_events_url":"https://api.github.com/users/Priya91/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Priya91/corefx-1","description":"This repository contains the foundational libraries that make up the .NET Core development stack.","fork":true,"url":"https://api.github.com/repos/Priya91/corefx-1","forks_url":"https://api.github.com/repos/Priya91/corefx-1/forks","keys_url":"https://api.github.com/repos/Priya91/corefx-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Priya91/corefx-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Priya91/corefx-1/teams","hooks_url":"https://api.github.com/repos/Priya91/corefx-1/hooks","issue_events_url":"https://api.github.com/repos/Priya91/corefx-1/issues/events{/number}","events_url":"https://api.github.com/repos/Priya91/corefx-1/events","assignees_url":"https://api.github.com/repos/Priya91/corefx-1/assignees{/user}","branches_url":"https://api.github.com/repos/Priya91/corefx-1/branches{/branch}","tags_url":"https://api.github.com/repos/Priya91/corefx-1/tags","blobs_url":"https://api.github.com/repos/Priya91/corefx-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Priya91/corefx-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Priya91/corefx-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/Priya91/corefx-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Priya91/corefx-1/statuses/{sha}","languages_url":"https://api.github.com/repos/Priya91/corefx-1/languages","stargazers_url":"https://api.github.com/repos/Priya91/corefx-1/stargazers","contributors_url":"https://api.github.com/repos/Priya91/corefx-1/contributors","subscribers_url":"https://api.github.com/repos/Priya91/corefx-1/subscribers","subscription_url":"https://api.github.com/repos/Priya91/corefx-1/subscription","commits_url":"https://api.github.com/repos/Priya91/corefx-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/Priya91/corefx-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/Priya91/corefx-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/Priya91/corefx-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/Priya91/corefx-1/contents/{+path}","compare_url":"https://api.github.com/repos/Priya91/corefx-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Priya91/corefx-1/merges","archive_url":"https://api.github.com/repos/Priya91/corefx-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Priya91/corefx-1/downloads","issues_url":"https://api.github.com/repos/Priya91/corefx-1/issues{/number}","pulls_url":"https://api.github.com/repos/Priya91/corefx-1/pulls{/number}","milestones_url":"https://api.github.com/repos/Priya91/corefx-1/milestones{/number}","notifications_url":"https://api.github.com/repos/Priya91/corefx-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Priya91/corefx-1/labels{/name}","releases_url":"https://api.github.com/repos/Priya91/corefx-1/releases{/id}","deployments_url":"https://api.github.com/repos/Priya91/corefx-1/deployments","created_at":"2014-11-24T05:35:16Z","updated_at":"2016-03-15T18:06:54Z","pushed_at":"2016-10-06T05:38:19Z","git_url":"git://github.com/Priya91/corefx-1.git","ssh_url":"git@github.com:Priya91/corefx-1.git","clone_url":"https://github.com/Priya91/corefx-1.git","svn_url":"https://github.com/Priya91/corefx-1","homepage":"","size":102454,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"0dc727c53b6752d235de7926bbc45457cbec2c90","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":26295345,"name":"corefx","full_name":"dotnet/corefx","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/corefx","description":"This repo contains the .NET Core foundational libraries, called CoreFX. It includes classes for collections, file systems, console, XML, async and many others.","fork":false,"url":"https://api.github.com/repos/dotnet/corefx","forks_url":"https://api.github.com/repos/dotnet/corefx/forks","keys_url":"https://api.github.com/repos/dotnet/corefx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/corefx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/corefx/teams","hooks_url":"https://api.github.com/repos/dotnet/corefx/hooks","issue_events_url":"https://api.github.com/repos/dotnet/corefx/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/corefx/events","assignees_url":"https://api.github.com/repos/dotnet/corefx/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/corefx/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/corefx/tags","blobs_url":"https://api.github.com/repos/dotnet/corefx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/corefx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/corefx/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/corefx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/corefx/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/corefx/languages","stargazers_url":"https://api.github.com/repos/dotnet/corefx/stargazers","contributors_url":"https://api.github.com/repos/dotnet/corefx/contributors","subscribers_url":"https://api.github.com/repos/dotnet/corefx/subscribers","subscription_url":"https://api.github.com/repos/dotnet/corefx/subscription","commits_url":"https://api.github.com/repos/dotnet/corefx/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/corefx/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/corefx/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/corefx/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/corefx/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/corefx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/corefx/merges","archive_url":"https://api.github.com/repos/dotnet/corefx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/corefx/downloads","issues_url":"https://api.github.com/repos/dotnet/corefx/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/corefx/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/corefx/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/corefx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/corefx/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/corefx/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/corefx/deployments","created_at":"2014-11-06T23:42:48Z","updated_at":"2016-10-06T16:00:20Z","pushed_at":"2016-10-06T17:06:13Z","git_url":"git://github.com/dotnet/corefx.git","ssh_url":"git@github.com:dotnet/corefx.git","clone_url":"https://github.com/dotnet/corefx.git","svn_url":"https://github.com/dotnet/corefx","homepage":"https://docs.microsoft.com/dotnet/","size":147604,"stargazers_count":10609,"watchers_count":10609,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2658,"mirror_url":null,"open_issues_count":1533,"forks":2658,"open_issues":1533,"watchers":10609,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/12416"},"html":{"href":"https://github.com/dotnet/corefx/pull/12416"},"issue":{"href":"https://api.github.com/repos/dotnet/corefx/issues/12416"},"comments":{"href":"https://api.github.com/repos/dotnet/corefx/issues/12416/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/12416/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/12416/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/corefx/statuses/44ac8f19b6d7fd6897237a93935be75b8318a8e3"}}}}
{"actor":{"display_login":"justinvp"}}