{"action":"created","issue":{"url":"https://api.github.com/repos/mitodl/micromasters/issues/830","repository_url":"https://api.github.com/repos/mitodl/micromasters","labels_url":"https://api.github.com/repos/mitodl/micromasters/issues/830/labels{/name}","comments_url":"https://api.github.com/repos/mitodl/micromasters/issues/830/comments","events_url":"https://api.github.com/repos/mitodl/micromasters/issues/830/events","html_url":"https://github.com/mitodl/micromasters/issues/830","id":170506881,"number":830,"title":"Create models to support sent-mail views ","user":{"login":"gsidebo","id":14932219,"avatar_url":"https://avatars.githubusercontent.com/u/14932219?v=3","gravatar_id":"","url":"https://api.github.com/users/gsidebo","html_url":"https://github.com/gsidebo","followers_url":"https://api.github.com/users/gsidebo/followers","following_url":"https://api.github.com/users/gsidebo/following{/other_user}","gists_url":"https://api.github.com/users/gsidebo/gists{/gist_id}","starred_url":"https://api.github.com/users/gsidebo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsidebo/subscriptions","organizations_url":"https://api.github.com/users/gsidebo/orgs","repos_url":"https://api.github.com/users/gsidebo/repos","events_url":"https://api.github.com/users/gsidebo/events{/privacy}","received_events_url":"https://api.github.com/users/gsidebo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-10T20:09:08Z","updated_at":"2016-08-10T20:25:09Z","closed_at":null,"body":"**Sent-mail views: #808** \r\n\r\nSome details that should guide the design of these models:\r\n\r\n- For this version of Micromasters email, messages can only be sent to an entire set of users that match a search query. We will need to keep track of the individual recipients due to the 'send to new recipients' requirement, but the only way to send an email in this version is to have a search query. For each sent email, we'll need some way to store both the recipients and the parameters of the search query that yielded the recipients\r\n  - We should be careful with parameters like page number. The \"Email Learners\" (et al) button should not limit the recipient just to a current page - the entire set of learners that match the query should receive the email. Otherwise the 'send to new recipients' feature would effectively be broken.\r\n- We'll need to store the email message body as well as the subject line to enable resending\r\n- We want to be able to get certain stats about sent mails from Mailgun (open rate, etc). Our model for sent emails should include some reliable reference to the message as it was sent in Mailgun. \r\n- For the 'send to new recipients' requirement, we are going to create a new record for a sent mail. There's no requirement to 'group' individual sends of a message\r\n- The point of 'Send to new recipients' Is essentially going to calculate a set difference between the users that _currently_ match the search query and the previous recipients\r\n  - 'Send to new recipients' will only be available when a message in the sent-mail view is expanded. We won't need to calculate these new recipients on page load\r\n"},"comment":{"url":"https://api.github.com/repos/mitodl/micromasters/issues/comments/238992584","html_url":"https://github.com/mitodl/micromasters/issues/830#issuecomment-238992584","issue_url":"https://api.github.com/repos/mitodl/micromasters/issues/830","id":238992584,"user":{"login":"gsidebo","id":14932219,"avatar_url":"https://avatars.githubusercontent.com/u/14932219?v=3","gravatar_id":"","url":"https://api.github.com/users/gsidebo","html_url":"https://github.com/gsidebo","followers_url":"https://api.github.com/users/gsidebo/followers","following_url":"https://api.github.com/users/gsidebo/following{/other_user}","gists_url":"https://api.github.com/users/gsidebo/gists{/gist_id}","starred_url":"https://api.github.com/users/gsidebo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsidebo/subscriptions","organizations_url":"https://api.github.com/users/gsidebo/orgs","repos_url":"https://api.github.com/users/gsidebo/repos","events_url":"https://api.github.com/users/gsidebo/events{/privacy}","received_events_url":"https://api.github.com/users/gsidebo/received_events","type":"User","site_admin":false},"created_at":"2016-08-10T20:25:09Z","updated_at":"2016-08-10T20:25:09Z","body":"Updated the notes re: message id. w/r/t delivery_count and open_rate, that is information we can just fetch directly from Mailgun. it makes some sense to do it that way since those numbers change over time - asking the Mailgun API for those stats will make them real-time"}}
{"actor":{"display_login":"gsidebo"}}