{"action":"created","issue":{"url":"https://api.github.com/repos/charto/cwait/issues/6","repository_url":"https://api.github.com/repos/charto/cwait","labels_url":"https://api.github.com/repos/charto/cwait/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/charto/cwait/issues/6/comments","events_url":"https://api.github.com/repos/charto/cwait/issues/6/events","html_url":"https://github.com/charto/cwait/issues/6","id":170533460,"number":6,"title":"Usage with vanilla Promise.all","user":{"login":"DanMMX","id":1919322,"avatar_url":"https://avatars.githubusercontent.com/u/1919322?v=3","gravatar_id":"","url":"https://api.github.com/users/DanMMX","html_url":"https://github.com/DanMMX","followers_url":"https://api.github.com/users/DanMMX/followers","following_url":"https://api.github.com/users/DanMMX/following{/other_user}","gists_url":"https://api.github.com/users/DanMMX/gists{/gist_id}","starred_url":"https://api.github.com/users/DanMMX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanMMX/subscriptions","organizations_url":"https://api.github.com/users/DanMMX/orgs","repos_url":"https://api.github.com/users/DanMMX/repos","events_url":"https://api.github.com/users/DanMMX/events{/privacy}","received_events_url":"https://api.github.com/users/DanMMX/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-10T22:25:30Z","updated_at":"2016-08-23T04:17:39Z","closed_at":"2016-08-23T04:17:39Z","body":"I have the following code:\r\n\r\n```\r\n        let emails = results.map((options, idx) => {\r\n          Object.assign(options, {\r\n            to: `${users[idx].name} <${users[idx].email}>`\r\n          }, mailOpts);\r\n\r\n          return new Promise((resolve, reject) => {\r\n            transporter.sendMail(options, function (error, info) {\r\n              if (error) {\r\n                console.log('error', error);\r\n                reject(error);\r\n              } else {\r\n                console.log('Message sent: ' + info.response);\r\n                resolve();\r\n              }\r\n            });\r\n          })\r\n        });\r\n\r\n        return Promise.all(emails);\r\n```\r\n\r\nby the examples it isn't very clear where I should add the wrapper, can you give me some guidance please?\r\n\r\nMy intention is to limit the send of 3 or 4 emails at a time"},"comment":{"url":"https://api.github.com/repos/charto/cwait/issues/comments/241622450","html_url":"https://github.com/charto/cwait/issues/6#issuecomment-241622450","issue_url":"https://api.github.com/repos/charto/cwait/issues/6","id":241622450,"user":{"login":"jjrv","id":778781,"avatar_url":"https://avatars.githubusercontent.com/u/778781?v=3","gravatar_id":"","url":"https://api.github.com/users/jjrv","html_url":"https://github.com/jjrv","followers_url":"https://api.github.com/users/jjrv/followers","following_url":"https://api.github.com/users/jjrv/following{/other_user}","gists_url":"https://api.github.com/users/jjrv/gists{/gist_id}","starred_url":"https://api.github.com/users/jjrv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjrv/subscriptions","organizations_url":"https://api.github.com/users/jjrv/orgs","repos_url":"https://api.github.com/users/jjrv/repos","events_url":"https://api.github.com/users/jjrv/events{/privacy}","received_events_url":"https://api.github.com/users/jjrv/received_events","type":"User","site_admin":false},"created_at":"2016-08-23T04:17:38Z","updated_at":"2016-08-23T04:17:38Z","body":"Closing this for now, feel free to reopen if you have any further questions."}}
{"actor":{"display_login":"jjrv"}}