Index: notifications.cron.inc =================================================================== --- notifications.cron.inc (revision 21) +++ notifications.cron.inc (working copy) @@ -426,7 +426,13 @@ // Get subject out of text and build the message array $subject = $text['subject']; unset($text['subject']); - return array('subject' => $subject, 'body' => $text); + + $attach_result = db_query("SELECT * FROM {upload} WHERE nid = %d", $event->params['nid']); + while($attach_row = db_fetch_object($attach_result)) { + $attach_file = db_fetch_object(db_query("SELECT * FROM {files} WHERE fid = %d", $attach_row->fid)); + } + + return array('subject' => $subject, 'body' => $text, 'attachment' => $attach_file->filepath); } /**** Retrieving and replacing text parts, interfacing with tokens and messaging module ****/ @@ -488,6 +494,7 @@ function notifications_message_send($account, &$message, $send_method) { $message['type'] = 'notifications'; notifications_process('count', 'message'); + messaging_message_send_user($account, $message, $send_method); }