{"action":"created","comment":{"url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/pulls/comments/36796273","id":36796273,"diff_hunk":"@@ -11,7 +11,20 @@ def self.delivering_email(message)\n           message.to = Config[:intercept_email]\n         end\n \n-        message.bcc ||= Config[:mail_bcc] if Config[:mail_bcc].present?\n+        if Config[:mail_bcc].present?\n+          if message.bcc.present?\n+            if message.bcc.respond_to?(:each)\n+              original_bcc = message.bcc\n+            else\n+              original_bcc = message.bcc.split(',').map(&:strip)\n+            end\n+            ","path":"lib/spree/core/mail_interceptor.rb","position":12,"original_position":12,"commit_id":"f170a4cbc602d5ebbb46f38673dbadfc00783b45","original_commit_id":"f170a4cbc602d5ebbb46f38673dbadfc00783b45","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Trailing whitespace detected.","created_at":"2015-08-11T20:44:08Z","updated_at":"2015-08-11T20:44:08Z","html_url":"https://github.com/spree-contrib/spree_mail_settings/pull/18#discussion_r36796273","pull_request_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/spree-contrib/spree_mail_settings/pulls/comments/36796273"},"html":{"href":"https://github.com/spree-contrib/spree_mail_settings/pull/18#discussion_r36796273"},"pull_request":{"href":"https://api.github.com/repos/spree-contrib/spree_mail_settings/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/pulls/18","id":42123670,"html_url":"https://github.com/spree-contrib/spree_mail_settings/pull/18","diff_url":"https://github.com/spree-contrib/spree_mail_settings/pull/18.diff","patch_url":"https://github.com/spree-contrib/spree_mail_settings/pull/18.patch","issue_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/issues/18","number":18,"state":"open","locked":false,"title":"Add preferred emails instead of defaulting to message.bcc","user":{"login":"Krule","id":38747,"avatar_url":"https://avatars.githubusercontent.com/u/38747?v=3","gravatar_id":"","url":"https://api.github.com/users/Krule","html_url":"https://github.com/Krule","followers_url":"https://api.github.com/users/Krule/followers","following_url":"https://api.github.com/users/Krule/following{/other_user}","gists_url":"https://api.github.com/users/Krule/gists{/gist_id}","starred_url":"https://api.github.com/users/Krule/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Krule/subscriptions","organizations_url":"https://api.github.com/users/Krule/orgs","repos_url":"https://api.github.com/users/Krule/repos","events_url":"https://api.github.com/users/Krule/events{/privacy}","received_events_url":"https://api.github.com/users/Krule/received_events","type":"User","site_admin":false},"body":"It is very counter intuitive to just default to bcc set in mailer. Especially in cases when it is necessary to set it up there for conditional mailing.\r\n\r\nI would like to propose that, instead, BCCs should added to already defined message.bcc.","created_at":"2015-08-11T12:35:51Z","updated_at":"2015-08-11T20:44:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d6247d59225d7123812f847749771fe27e622a20","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/pulls/18/commits","review_comments_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/pulls/18/comments","review_comment_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/issues/18/comments","statuses_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/statuses/f170a4cbc602d5ebbb46f38673dbadfc00783b45","head":{"label":"Krule:patch-1","ref":"patch-1","sha":"f170a4cbc602d5ebbb46f38673dbadfc00783b45","user":{"login":"Krule","id":38747,"avatar_url":"https://avatars.githubusercontent.com/u/38747?v=3","gravatar_id":"","url":"https://api.github.com/users/Krule","html_url":"https://github.com/Krule","followers_url":"https://api.github.com/users/Krule/followers","following_url":"https://api.github.com/users/Krule/following{/other_user}","gists_url":"https://api.github.com/users/Krule/gists{/gist_id}","starred_url":"https://api.github.com/users/Krule/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Krule/subscriptions","organizations_url":"https://api.github.com/users/Krule/orgs","repos_url":"https://api.github.com/users/Krule/repos","events_url":"https://api.github.com/users/Krule/events{/privacy}","received_events_url":"https://api.github.com/users/Krule/received_events","type":"User","site_admin":false},"repo":{"id":40539879,"name":"spree_mail_settings","full_name":"Krule/spree_mail_settings","owner":{"login":"Krule","id":38747,"avatar_url":"https://avatars.githubusercontent.com/u/38747?v=3","gravatar_id":"","url":"https://api.github.com/users/Krule","html_url":"https://github.com/Krule","followers_url":"https://api.github.com/users/Krule/followers","following_url":"https://api.github.com/users/Krule/following{/other_user}","gists_url":"https://api.github.com/users/Krule/gists{/gist_id}","starred_url":"https://api.github.com/users/Krule/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Krule/subscriptions","organizations_url":"https://api.github.com/users/Krule/orgs","repos_url":"https://api.github.com/users/Krule/repos","events_url":"https://api.github.com/users/Krule/events{/privacy}","received_events_url":"https://api.github.com/users/Krule/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Krule/spree_mail_settings","description":"Mail setting functionality extracted from Spree.","fork":true,"url":"https://api.github.com/repos/Krule/spree_mail_settings","forks_url":"https://api.github.com/repos/Krule/spree_mail_settings/forks","keys_url":"https://api.github.com/repos/Krule/spree_mail_settings/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Krule/spree_mail_settings/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Krule/spree_mail_settings/teams","hooks_url":"https://api.github.com/repos/Krule/spree_mail_settings/hooks","issue_events_url":"https://api.github.com/repos/Krule/spree_mail_settings/issues/events{/number}","events_url":"https://api.github.com/repos/Krule/spree_mail_settings/events","assignees_url":"https://api.github.com/repos/Krule/spree_mail_settings/assignees{/user}","branches_url":"https://api.github.com/repos/Krule/spree_mail_settings/branches{/branch}","tags_url":"https://api.github.com/repos/Krule/spree_mail_settings/tags","blobs_url":"https://api.github.com/repos/Krule/spree_mail_settings/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Krule/spree_mail_settings/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Krule/spree_mail_settings/git/refs{/sha}","trees_url":"https://api.github.com/repos/Krule/spree_mail_settings/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Krule/spree_mail_settings/statuses/{sha}","languages_url":"https://api.github.com/repos/Krule/spree_mail_settings/languages","stargazers_url":"https://api.github.com/repos/Krule/spree_mail_settings/stargazers","contributors_url":"https://api.github.com/repos/Krule/spree_mail_settings/contributors","subscribers_url":"https://api.github.com/repos/Krule/spree_mail_settings/subscribers","subscription_url":"https://api.github.com/repos/Krule/spree_mail_settings/subscription","commits_url":"https://api.github.com/repos/Krule/spree_mail_settings/commits{/sha}","git_commits_url":"https://api.github.com/repos/Krule/spree_mail_settings/git/commits{/sha}","comments_url":"https://api.github.com/repos/Krule/spree_mail_settings/comments{/number}","issue_comment_url":"https://api.github.com/repos/Krule/spree_mail_settings/issues/comments{/number}","contents_url":"https://api.github.com/repos/Krule/spree_mail_settings/contents/{+path}","compare_url":"https://api.github.com/repos/Krule/spree_mail_settings/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Krule/spree_mail_settings/merges","archive_url":"https://api.github.com/repos/Krule/spree_mail_settings/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Krule/spree_mail_settings/downloads","issues_url":"https://api.github.com/repos/Krule/spree_mail_settings/issues{/number}","pulls_url":"https://api.github.com/repos/Krule/spree_mail_settings/pulls{/number}","milestones_url":"https://api.github.com/repos/Krule/spree_mail_settings/milestones{/number}","notifications_url":"https://api.github.com/repos/Krule/spree_mail_settings/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Krule/spree_mail_settings/labels{/name}","releases_url":"https://api.github.com/repos/Krule/spree_mail_settings/releases{/id}","created_at":"2015-08-11T12:16:43Z","updated_at":"2015-08-11T12:16:43Z","pushed_at":"2015-08-11T20:44:01Z","git_url":"git://github.com/Krule/spree_mail_settings.git","ssh_url":"git@github.com:Krule/spree_mail_settings.git","clone_url":"https://github.com/Krule/spree_mail_settings.git","svn_url":"https://github.com/Krule/spree_mail_settings","homepage":"http://spreecommerce.com","size":171,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"spree-contrib:master","ref":"master","sha":"13d712181a1642b60f35b8ec50cf7deb52f0b8d4","user":{"login":"spree-contrib","id":6852220,"avatar_url":"https://avatars.githubusercontent.com/u/6852220?v=3","gravatar_id":"","url":"https://api.github.com/users/spree-contrib","html_url":"https://github.com/spree-contrib","followers_url":"https://api.github.com/users/spree-contrib/followers","following_url":"https://api.github.com/users/spree-contrib/following{/other_user}","gists_url":"https://api.github.com/users/spree-contrib/gists{/gist_id}","starred_url":"https://api.github.com/users/spree-contrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spree-contrib/subscriptions","organizations_url":"https://api.github.com/users/spree-contrib/orgs","repos_url":"https://api.github.com/users/spree-contrib/repos","events_url":"https://api.github.com/users/spree-contrib/events{/privacy}","received_events_url":"https://api.github.com/users/spree-contrib/received_events","type":"Organization","site_admin":false},"repo":{"id":17265971,"name":"spree_mail_settings","full_name":"spree-contrib/spree_mail_settings","owner":{"login":"spree-contrib","id":6852220,"avatar_url":"https://avatars.githubusercontent.com/u/6852220?v=3","gravatar_id":"","url":"https://api.github.com/users/spree-contrib","html_url":"https://github.com/spree-contrib","followers_url":"https://api.github.com/users/spree-contrib/followers","following_url":"https://api.github.com/users/spree-contrib/following{/other_user}","gists_url":"https://api.github.com/users/spree-contrib/gists{/gist_id}","starred_url":"https://api.github.com/users/spree-contrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spree-contrib/subscriptions","organizations_url":"https://api.github.com/users/spree-contrib/orgs","repos_url":"https://api.github.com/users/spree-contrib/repos","events_url":"https://api.github.com/users/spree-contrib/events{/privacy}","received_events_url":"https://api.github.com/users/spree-contrib/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spree-contrib/spree_mail_settings","description":"Mail setting functionality extracted from Spree.","fork":false,"url":"https://api.github.com/repos/spree-contrib/spree_mail_settings","forks_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/forks","keys_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/teams","hooks_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/hooks","issue_events_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/issues/events{/number}","events_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/events","assignees_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/assignees{/user}","branches_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/branches{/branch}","tags_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/tags","blobs_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/git/refs{/sha}","trees_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/statuses/{sha}","languages_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/languages","stargazers_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/stargazers","contributors_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/contributors","subscribers_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/subscribers","subscription_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/subscription","commits_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/commits{/sha}","git_commits_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/git/commits{/sha}","comments_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/comments{/number}","issue_comment_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/issues/comments{/number}","contents_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/contents/{+path}","compare_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/merges","archive_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/downloads","issues_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/issues{/number}","pulls_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/pulls{/number}","milestones_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/milestones{/number}","notifications_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/labels{/name}","releases_url":"https://api.github.com/repos/spree-contrib/spree_mail_settings/releases{/id}","created_at":"2014-02-27T21:48:42Z","updated_at":"2015-07-24T06:33:25Z","pushed_at":"2015-08-11T20:44:02Z","git_url":"git://github.com/spree-contrib/spree_mail_settings.git","ssh_url":"git@github.com:spree-contrib/spree_mail_settings.git","clone_url":"https://github.com/spree-contrib/spree_mail_settings.git","svn_url":"https://github.com/spree-contrib/spree_mail_settings","homepage":"http://spreecommerce.com","size":378,"stargazers_count":9,"watchers_count":9,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":48,"mirror_url":null,"open_issues_count":2,"forks":48,"open_issues":2,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spree-contrib/spree_mail_settings/pulls/18"},"html":{"href":"https://github.com/spree-contrib/spree_mail_settings/pull/18"},"issue":{"href":"https://api.github.com/repos/spree-contrib/spree_mail_settings/issues/18"},"comments":{"href":"https://api.github.com/repos/spree-contrib/spree_mail_settings/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/spree-contrib/spree_mail_settings/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/spree-contrib/spree_mail_settings/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spree-contrib/spree_mail_settings/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/spree-contrib/spree_mail_settings/statuses/f170a4cbc602d5ebbb46f38673dbadfc00783b45"}}}}