--- privatemsg_orig.module	2008-12-18 10:26:33.000000000 -0600
+++ privatemsg.module	2008-12-23 12:44:51.000000000 -0600
@@ -644,10 +644,39 @@ function pm_send($form, &$form_state) {
   }
   // Also add a record for tha author to the pm_index table - set  column "new" to 0.
   db_query($query, $mid, $thread_id, $message['author']->uid, 0);
+  
+  // Allow other modules react to the sending of a private message,
+  // for example, by sending an email.
+  privatemsg_module_invoke('send', $message);
 
   drupal_set_message(t('A message has been sent to @recipients.', array('@recipients' => $form_state['values']['recipient'])));
 }
 
+/**
+ * Invokes hook_privatemsg() in every module.
+ *
+ * We cannot use module_invoke() for this, because the arguments need to
+ * be passed by reference.
+ */
+function privatemsg_module_invoke($op, &$array) {
+  foreach (module_list() as $module) {
+    $function = $module .'_privatemsg_'. $op;
+    if (function_exists($function)) {
+      $function($array);
+    }
+  }
+}
+
+/**
+ * Example implementation of hook_privatemsg().
+ * @param $type The type of action we are reacting to.
+ * @param $options An array of options that are submitted.
+ */
+function hook_privatemsg($type, $options) {
+  
+}
+
+
 function pm_preview($form, &$form_state) {
 
     drupal_validate_form($form['form_id']['#value'], $form, $form_state);
