The WSNs are mainly to monitor various types of sensing content. In the automated control system, administration centers (ACs) often send notifications to a set of nodes meeting given content ranges to implement specific actions. For instance, we notify the sensing devices with sensing temperatures greater than 35 to turn on the cooling system. At present, the transmission of notification messages is mostly based on node identification, which is isolated from sensing contents and unable to accurately locate nodes meeting the sensing content requirements. In this paper, we generalize two types of sensing contents: the continuous values and the discrete values, and a content-based efficient message transmission mechanism (CEMT) is proposed for the typical tree-like topologies in WSNs. Thus, a highly effective notifying method for content-based multicast and anycast messages is designed, which accurately sends notification messages to nodes whose sensing values belong to the given range. Sometimes, multiple sensing types of nodes are mixed together to construct a net topology, offering underlying transport services to each other. At this point, CEMT builds a specialized logical tree for the same type of nodes, and notification messages are transmitted along the logical tree. CEMT reduces the transmission time, bandwidth, and number of processing nodes when a content-based message is sent, and it takes less storage of content routing entries in nodes.