| 1 | Users need to be able to subscribe to/unsubscribe from receiving email notifications for activity stream events. |
| 2 | |
| 3 | This is not necessarily the same as following and unfollowing different activity streams (which then appear on the user's dashboard). The user may have activity streams on her dashboard for which she doesn't get email notifications, and perhaps also vice-versa. |
| 4 | |
| 5 | Some templating might have to be written to format activity stream events for plain text emails (as opposed formatting them for HTML as the current templating does). |
| 6 | |
| 7 | May need to add an email_subscriptions to the User class/database table? Or add a new table for it? |
| 8 | |
| 9 | The activity_create() function could be responsible for looking up subscriptions when an activity stream event is emitted and writing any activity stream event IDs out to a notifications outbox table. For package and resource activity events, the session extension may need to handle this. |
| 10 | |
| 11 | Another process will take rows out of the notifications outbox and send them as emails. |