diff --git a/workbench_email.moderation.inc b/workbench_email.moderation.inc
new file mode 100644
index 0000000..850d59a
--- /dev/null
+++ b/workbench_email.moderation.inc
@@ -0,0 +1,180 @@
+<?php
+
+/**
+ * Submit handler for the workbench_email form element.
+ *
+ * Sends emails to the specific users selected in the form element.
+ *
+ * @param array $form
+ *   The form array.
+ * @param array $form_state
+ *   The form state array
+ */
+function workbench_email_notification_submit_moderation($form, &$form_state) {
+  if (isset($form_state['values']['workbench_email'])) {
+    $node = $form['node']['#value'];
+
+    foreach ($form_state['values']['workbench_email'] as $rid => $role_emails) {
+      foreach ($role_emails as $email) {
+        // If !$email means all users option selected.
+        if (!$email) {
+          $accounts = array(); $editors = array();
+          $author = workbench_email_get_all_transition_users($node, 'node', $rid, $accounts, $editors);
+          $emails = workbench_email_filter_users($rid, $accounts, $editors, $author);
+          $email_transition = $form[$wrapper_id]['workbench_email'][$rid]['#hidden'];
+          foreach ($emails as $email => $name) {
+            workbench_email_mail_send($email, $email_transition, $node);
+          }
+        }
+        else {
+          $email_transition =  $form['workbench_email'][$rid]['#hidden'];
+          workbench_email_mail_send($email, $email_transition, $node);
+        }
+      }
+    }
+  }
+}
+
+/**
+ * Create the email selection form element.
+ *
+ * Creates the appropriate multi select list for a given role and stores
+ * some email transition information into the form element.
+ *
+ * @param array $form
+ *   The form array passed by reference
+ * @param array $settings
+ *   The array of additional settings
+ */
+function workbench_email_create_form_element_moderation(&$form, $settings) {
+  $email_transition = $settings['email_transition'];
+  $emails = $settings['emails'];
+  $author = $settings['author'];
+  $editors = $settings['editors'];
+  $users = $settings['users'];
+
+  if ($author) {
+    $role = workbench_email_get_author_role();
+  }
+  else {
+    $role = user_role_load($email_transition->rid);
+    if (count($emails) > 1) {
+      array_unshift($emails, t('-- All Users --'));
+    }
+  }
+
+  if ($email_transition->rid == WORKBENCH_EMAIL_AUTHOR) {
+    $description = t('Select the author for notification');
+  }
+  else {
+    $description = t('Select one or more users to notify');
+  }
+
+  $form['workbench_email'][$role->rid] = array(
+    '#type' => 'select',
+    '#title' => t("@role_name", array('@role_name' => ucwords($role->name))),
+    '#options' => $emails,
+    '#description' => $description,
+    '#multiple' => TRUE,
+    '#hidden' => $email_transition,
+  );
+
+  $user_groups = array('editors' => $editors, 'users' => $users);
+  drupal_alter('workbench_email_create_form_element', $form, $email_transition, $user_groups);
+}
+
+
+/**
+ * Ajax callback function, targets the workbench_email container.
+ *
+ * @param array $form
+ *   The form array
+ *
+ * @param array $form_state
+ *   The form_state array
+ */
+function worbench_email_form_node_moderation_callback($form, $form_state) {
+/*
+  if ($form['options']['#access']) {
+    return $form['options']['workbench_email'];
+  }
+*/
+  return $form['workbench_email'];
+}
+
+function workbench_email_form_workbench_moderation_moderate_form_alter(&$form, &$form_state, $form_id){
+  $node = $form['node']['#value'];
+
+  if (workbench_moderation_node_type_moderated($node->type)) {
+
+    $available = FALSE;
+    $wrapper_id = 'state';
+
+    $form['state']['#ajax'] = array(
+      'callback' => 'worbench_email_form_node_moderation_callback',
+      'wrapper' => 'workbench-email-form-node-moderation',
+      'effect' => 'fade',
+      'event' => 'change',
+    );
+
+
+    $form['workbench_email'] = array(
+      '#prefix' => '<div id="workbench-email-form-node-moderation">',
+      '#suffix' => '</div>',
+      '#tree' => TRUE,
+    );
+
+    // Determine current state.
+    if (isset($node->workbench_moderation['current']->state)) {
+      $current_from_state = $node->workbench_moderation['current']->state;
+    }
+    else {
+      $current_from_state = workbench_moderation_state_none();
+    }
+    if ($current_from_state == workbench_moderation_state_published()) {
+      $current_from_state = workbench_moderation_state_none();
+    }
+
+    // Initialize to the current state.
+    $form_moderation_state = $current_from_state;
+    if (!empty($form_state['values']) && isset($form_state['values']['state'])) {
+      $form_moderation_state = $form_state['values']['state'];
+    }
+
+    $workbench_emails = workbench_email_get();
+
+//    error_log('Workbench Emails: '. print_r($workbench_emails,true));
+    foreach ($workbench_emails as $transition => $email_roles) {
+      foreach ($email_roles as $rid => $email_transition) {
+        $accounts = array(); $editors = array();
+        $flags = workbench_email_get_all_transition_users(array('form' => $form, 'form_state' => $form_state), 'form', $email_transition->rid == 0 ? -1 : $email_transition->rid, $accounts, $editors);
+
+        $flags = array(
+          'author' => null,
+          'workbench_access_enabled' => null,
+          'section_selected' => null,
+          'workbench_access_configured' => null,
+        );
+
+        $emails = workbench_email_filter_users($email_transition->rid, $accounts, $editors, $flags);
+
+        if ($email_transition->from_name == $current_from_state &&
+          $email_transition->to_name == $form_moderation_state &&
+          !$email_transition->automatic && $emails) {
+          $settings = array(
+            'email_transition' => $email_transition,
+            'emails' => $emails,
+            'author' => $flags['author'],
+            'editors' => $editors,
+            'users' => $accounts,
+          );
+
+          workbench_email_create_form_element_moderation($form, $settings);
+        }
+      }
+    }
+
+    $form['#validate'][] = 'workbench_email_notification_validate';
+    $form['#submit'][] = 'workbench_email_notification_submit_moderation';
+  }
+}
\ No newline at end of file
diff --git a/workbench_email.module b/workbench_email.module
index 89cf34d..98a9259 100644
--- a/workbench_email.module
+++ b/workbench_email.module
@@ -8,6 +8,7 @@ define('WORKBENCH_EMAIL_AUTHOR', 0);
 define('WORKBENCH_EMAIL_QUEUE_NAME', 'workbench_email_queue_mail');
 
 include_once 'workbench_email.form.inc';
+include_once 'workbench_email.moderation.inc';
 
 /**
  * Implements hook_menu().
