diff -ruN modr8/modr8_admin.inc html/modules/modr8/modr8_admin.inc
--- modr8/modr8_admin.inc	2007-08-16 07:10:08.000000000 +0300
+++ html/modules/modr8/modr8_admin.inc	2007-11-12 17:15:59.000000000 +0200
@@ -33,7 +33,32 @@
     '#type' => 'fieldset',
     '#title' => t('E-mail'),
   );
+
+  $form['text']['modr8_email_roles'] = array(
+    '#type' => 'checkboxes',
+    '#title' => 'Send moderation mail to the following roles',
+    '#options' => user_roles(TRUE, 'moderate content'),
+    '#default_value' => variable_get('modr8_email_roles', array()),
+    '#description' => t('The users belonging to the roles selected will get a notification email when a node is submitted (usually a "moderator" role is created for that purpose). Only nodes with access to \'moderate_content\' will be displayed. Leave blank to disable moderation email'),
+  );
+
+  $form['text']['modr8_moderate_subject'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Moderation e-mail subject'),
+    '#default_value' => variable_get('modr8_moderate_subject', "[%site] %title has been submitted for moderation"),
+  );
+  
+  $macros = implode(', ', array_keys(modr8_replacements()));
+  
+  $moderate_default = modr8_moderate_default();
   
+  $form['text']['modr8_moderate_text'] = array(
+    '#type' => 'textarea',
+    '#title' => t('Acceptance e-mail'),
+    '#default_value' => variable_get('modr8_moderate_text', $moderate_default),
+  	'#description' => t('Replacement strings are: %macros', array('%macros' => $macros)),
+  );
+
   $form['text']['modr8_email_from'] = array(
     '#type' => 'textfield',
     '#title' => t('Moderator email adress'),
@@ -343,24 +368,6 @@
   return $note;
 }
 
-function modr8_replacements(){
-  return array(
-    '%title' => '$node->title',
-    '%teaser' => '$node->teaser',
-    '%body' => '$node->body',
-    '%short_date' => 'format_date($node->created, "short")',
-    '%medium_date' => 'format_date($node->created, "medium")',
-    '%long_date' => 'format_date($node->created, "long")',
-    '%type' => 'node_get_types("name", $node)',
-    '%node_url' => 'url("node/". $node->nid, NULL, NULL, TRUE)',
-    '%author_name' => '$account->name',
-    '%author_mail' => '$account->mail',
-    '%author_url' => 'url("user/". $account->uid, NULL, NULL, TRUE)',
-    '%site' => 'variable_get("site_name", "Drupal")',
-    '%note' => '$note',
-  );
-}
-
 function modr8_accept_default() {
   return t(
 'Your %type entry entitled "%title" has been approved by our content moderator! Other visitors to %site will now be able to view it.
diff -ruN modr8/modr8.module html/modules/modr8/modr8.module
--- modr8/modr8.module	2007-08-16 05:58:04.000000000 +0300
+++ html/modules/modr8/modr8.module	2007-11-12 18:03:42.000000000 +0200
@@ -135,6 +135,7 @@
     case 'insert' :
       db_query('UPDATE {node} SET moderate = %d WHERE nid = %d', $node->moderate, $node->nid);
       if ($node->moderate) { //cut this?
+        modr8_modr8mail($node->nid);
         theme('modr8_message', FALSE, $node->type, $op);
       }
       break;
@@ -293,3 +294,99 @@
     return '';
   }
 }
+
+function modr8_modr8mail($nid){
+  $node = node_load($nid);
+  
+  if (is_object($node)) {
+    // Get the sender address
+    $from = variable_get('modr8_email_from', '');
+    if (!$from) {
+      $sendmail_from = ini_get('sendmail_from');
+      $from = variable_get('site_mail', $sendmail_from);
+    } 
+    if (empty($from) || $from == $sendmail_from) {
+      drupal_set_message(t('You should create an administrator mail address for your site! <a href="@url">Do it here</a>.', array('@url' => url('admin/settings/site-information'))), 'error');
+    }
+    $subject = variable_get('modr8_moderate_subject', '[%site] %title has been submitted');
+    $message = variable_get('modr8_moderate_text', modr8_moderate_default());
+
+    $replacements_raw = modr8_replacements();
+    foreach ($replacements_raw as $key => $val) {
+      eval('$replacements["$key"] = '. $val .';');
+    }
+    
+    // replace the macros
+    $subject = strtr($subject, $replacements);
+    $message = strtr($message, $replacements);
+ 
+    // Get the recipient(s) from the roles configured to receive the moderation email
+    // Get the roles
+    $roles = variable_get('modr8_email_roles', array());
+
+    // Get all the users in the roles
+    $users = users_in_roles($roles);
+  
+    // Loop over the users in each role and build an array of the email addresses
+    foreach ($users as $u) {
+      // Send the email to each user in the array
+      if (drupal_mail('modr8_modr8mail', $u, $subject, $message, $from)) {
+        watchdog('action', t('Sent email to %recipient', array('%recipient' => $u)));
+      }
+      else {
+        watchdog('error', t('Unable to send email to %recipient', array('%recipient' => $u)));
+      }
+    }
+  }
+  else {
+    $message = t('An error occurred when trying to load this content.');
+    watchdog('error', $message); // this probably won't ever get called
+  }
+  return;
+}
+
+function users_in_roles($roles) {
+  if (!empty($roles)) {
+    $users = array();
+    $rids = join(',',$roles);
+    $result = db_query("SELECT u.mail FROM {users} u INNER JOIN {users_roles} ur ON u.uid=ur.uid WHERE ur.rid IN (%s) AND u.status = 1", $rids);
+    while ($u = db_fetch_object($result)) {
+       $users[] = $u->mail;
+    }
+    return $users;
+  }
+}
+
+function modr8_replacements(){
+  return array(
+    '%title' => '$node->title',
+    '%teaser' => '$node->teaser',
+    '%body' => '$node->body',
+    '%short_date' => 'format_date($node->created, "short")',
+    '%medium_date' => 'format_date($node->created, "medium")',
+    '%long_date' => 'format_date($node->created, "long")',
+    '%type' => 'node_get_types("name", $node)',
+    '%node_url' => 'url("node/". $node->nid, NULL, NULL, TRUE)',
+    '%author_name' => '$account->name',
+    '%author_mail' => '$account->mail',
+    '%author_url' => 'url("user/". $account->uid, NULL, NULL, TRUE)',
+    '%site' => 'variable_get("site_name", "Drupal")',
+    '%note' => '$note',
+  );
+}
+
+function modr8_moderate_default() {
+  return t(
+'A %type entry entitled "%title" has been submitted for moderation!
+
+You can visit 
+
+http://heptools.inp.demokritos.gr/admin/content/modr8 
+
+to moderate the node.
+
+Regards,
+The %site coordinator');
+}
+
+
