--- notifications.admin.inc	Wed May 13 12:23:59 2009
+++ notifications.admin.inc	Fri May 08 11:16:18 2009
@@ -22,6 +22,12 @@
     '#default_value' => variable_get('notifications_send_immediate', 0),
     '#description' => t('Notifications are usually queued to be sent on cron process later. Checking this option will cause immediate notifications to be sent right away, instead of being queued. This will produce more timely notifications for sites with a small number of users. Not recommended for sites with a large number of users. This may not work for AJAX forms and notifications will be queued anyway.'),
   );
+  $form['general']['notifications_send_attachments'] = array(
+    '#title' => t('Include attachments with notifications'),
+    '#type' => 'checkbox',
+    '#default_value' => variable_get('notifications_send_attachments', 0),
+    '#description' => t('Include information about any attachments to a node in outgoing notifications. In the Messaging module, you can use tokens to include links to attachments, and actually include attachments for supported sending methods.'),
+  );
   $form['general']['notifications_sender'] = array(
     '#title' => t('Notifications Sender'),
     '#type' => 'radios',
--- notifications.cron.inc	Wed May 13 12:23:59 2009
+++ notifications.cron.inc	Wed May 13 12:19:58 2009
@@ -491,7 +491,16 @@
   // Get subject out of text and build the message array
   $subject = $text['subject'];
   unset($text['subject']);
-  return array('subject' => $subject, 'body' => $text);
+
+  // Find any attachments to node
+  if (variable_get('notifications_send_attachments', 0)) {
+    $attach_result = db_query("SELECT * FROM {upload} WHERE nid = %d", $event->params['nid']);
+    while($attach_row = db_fetch_object($attach_result)) {
+      $attachments[] = db_fetch_object(db_query("SELECT * FROM {files} WHERE fid = %d", $attach_row->fid));
+    }
+  }
+
+  return array('subject' => $subject, 'body' => $text, 'attachments' => $attachments);
 }
 
 /**** Retrieving and replacing text parts, interfacing with tokens and messaging module ****/
