Unless you want to re-invent the wheel, you should have a look at the Message Stack, which does exactly what you are asking for (and much more ...). The Message Stack consists of these modules (quotes are from the module's project page):
The Message module is the core of the message stack. It enables logging and displaying system events in a number of different use cases. Events that are recorded over time are sometimes call activity streams. Exportable messages subtypes can be created for different use cases with custom fields and display (view) modes.
This module provides a method for sending a message via a notifier plugin. Message Notify comes with plugins for email and SMS and may be extended to other transport mechanisms as required.
With this module, users who subscribe to content will be notified when events occur that involve that content. The module leverages the Flag module, which provides a subscribe functionality to users.
These are the basic components and dependencies of the message stack:
Quite a few popular Drupal distributions already adopted to this Message Stack, such as such as Commerce Kickstart, Drupal Commons, ERPAL and Open Atrium.
If you want to have a closer look at the Message Stack and see it at work in your own environment, then experiment a bit with the Answers module (disclosure: I'm a co-maintainer), together with the Answers Notification sub-module, which allows logged in users to subscribe to selected questions (= nodes of content type "Question"), and so that they receive notifications (using the Message Stack) when Questions receive Answers (= nodes of content type "Answer").