commit 6708770751c068b6e1aed7ee32abdc15496941a0
Author: Lance A. Brown <brown@stat.duke.edu>
Date:   Thu Mar 15 17:03:41 2012 -0400

    Look up correct term id for post in forum_nodeapi

diff --git a/femail.module b/femail.module
index 213e5f4..61ea610 100644
--- a/femail.module
+++ b/femail.module
@@ -361,10 +361,15 @@ function femail_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL){
     }
     // We've added/updated a forum post, lets mail it out
     // First, we'll get the forum that this has been posted to.
-    $forum_tid = $node->taxonomy[variable_get('forum_nav_vocabulary', 0)];
+    $forum_tid = "";
+    $terms = taxonomy_node_get_terms_by_vocabulary($node, variable_get('forum_nav_vocabulary', 0));
+    foreach ($terms as $tid => $term)
+    {
+      $forum_tid = $tid;
+    }
     if($forum_tid){
       module_load_include('mail.inc', 'femail');
       _femail_send_message($forum_tid, $node->title, $node->body, $node->nid, $node->files);
     }
   }
-}
\ No newline at end of file
+}
