{"action":"created","issue":{"url":"https://api.github.com/repos/VeliovGroup/Mail-Time/issues/6","repository_url":"https://api.github.com/repos/VeliovGroup/Mail-Time","labels_url":"https://api.github.com/repos/VeliovGroup/Mail-Time/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/VeliovGroup/Mail-Time/issues/6/comments","events_url":"https://api.github.com/repos/VeliovGroup/Mail-Time/issues/6/events","html_url":"https://github.com/VeliovGroup/Mail-Time/issues/6","id":293927835,"number":6,"title":"Emails go out of order sometimes","user":{"login":"theoutlander","id":749084,"avatar_url":"https://avatars0.githubusercontent.com/u/749084?v=4","gravatar_id":"","url":"https://api.github.com/users/theoutlander","html_url":"https://github.com/theoutlander","followers_url":"https://api.github.com/users/theoutlander/followers","following_url":"https://api.github.com/users/theoutlander/following{/other_user}","gists_url":"https://api.github.com/users/theoutlander/gists{/gist_id}","starred_url":"https://api.github.com/users/theoutlander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theoutlander/subscriptions","organizations_url":"https://api.github.com/users/theoutlander/orgs","repos_url":"https://api.github.com/users/theoutlander/repos","events_url":"https://api.github.com/users/theoutlander/events{/privacy}","received_events_url":"https://api.github.com/users/theoutlander/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-02T15:35:50Z","updated_at":"2018-02-03T01:16:25Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"### I have a suggestion:\r\nIt appears that emails can go out of order. If I were to enqueue multiple emails for a user a few seconds apart, they can be sent out in a random order. This breaks the user experience.\r\n\r\nWhen a user signs-up, we enqueue a thank-you email. Once a specific activity is completed after that, another email is enqueued. This could be a few seconds to minutes apart. It would be nice if the order of those emails is preserved based on the email address and when it was enqueued.\r\n\r\nMail-Time 0.1.7\r\nNode 8.9.1\r\nNpm 5.6.0"},"comment":{"url":"https://api.github.com/repos/VeliovGroup/Mail-Time/issues/comments/362758885","html_url":"https://github.com/VeliovGroup/Mail-Time/issues/6#issuecomment-362758885","issue_url":"https://api.github.com/repos/VeliovGroup/Mail-Time/issues/6","id":362758885,"user":{"login":"theoutlander","id":749084,"avatar_url":"https://avatars0.githubusercontent.com/u/749084?v=4","gravatar_id":"","url":"https://api.github.com/users/theoutlander","html_url":"https://github.com/theoutlander","followers_url":"https://api.github.com/users/theoutlander/followers","following_url":"https://api.github.com/users/theoutlander/following{/other_user}","gists_url":"https://api.github.com/users/theoutlander/gists{/gist_id}","starred_url":"https://api.github.com/users/theoutlander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theoutlander/subscriptions","organizations_url":"https://api.github.com/users/theoutlander/orgs","repos_url":"https://api.github.com/users/theoutlander/repos","events_url":"https://api.github.com/users/theoutlander/events{/privacy}","received_events_url":"https://api.github.com/users/theoutlander/received_events","type":"User","site_admin":false},"created_at":"2018-02-03T01:16:25Z","updated_at":"2018-02-03T01:16:25Z","author_association":"CONTRIBUTOR","body":"I have noticed during our pre-production testing that in my first test the emails were out of order. I haven't tried to repro it, but we are testing our app for the next release so I will be able to answer it after a few more runs.\r\n\r\nThe sendAt option won't work most likely as these are supposed to be instantaneous emails. I don't know how much of a delay would need to be introduced and if the library would ensure the order of delivery. \r\n\r\nHere's rest of the info you requested:\r\n\r\n```\r\n    \"nodemailer\": \"^4.4.1\",\r\n    \"nodemailer-mailgun-transport\": \"^1.3.6\"\r\n```\r\n\r\n``` \r\nlet mailServer = new MailTime({\r\n  debug: true,\r\n  db: db, // MongoDB\r\n  type: 'server',\r\n  strategy: 'balancer', // Transports will be used in round robin chain\r\n  transports: transports,\r\n  from: function (transport) { return `****Redacted****` },\r\n  concatEmails: true, // Concatenate emails to the same addressee\r\n  concatDelimiter: '<h1>{{{subject}}}</h1>', // Start each concatenated email with it's own subject\r\n  template: MailTime.Template // Use default template\r\n})\r\n```"}}
{"actor":{"display_login":"theoutlander"}}