public function sendMessage($body, $to, $item = NULL, $type = NULL, $subject = NULL, $tobare = false) {
		$to = new JID($to);
		$this->send('<message ' . (is_null($type) ? ' ' : 'type="' . $type . '" ') . 'from="' . (is_null($item) ? ($from = $this->component_name) : ($from = $item . '@' . $this->component_name)) . '" to="' . ($tobare ? htmlspecialchars($to->bare()) : htmlspecialchars($to)) . '">' . (is_null($subject) ? '' : '<subject>' . htmlspecialchars($subject) . '</subject>') . '<body>' . htmlspecialchars($body) . '</body></message>');
		$this->log("sent <message> from {$from} to {$to}", true, PHP_COMPONENT_MESSAGE_INFO);
	}
public function sendMessage($body, $to, $item = NULL, $type = NULL, $subject = NULL, $tobare = false) {
		$to = new JID($to);
		$this->send('<message ' . (is_null($type) ? ' ' : 'type="' . $type . '" ') . 'from="' . (is_null($item) ? ($from = $this->component_name) : ($from = $item . '@' . $this->component_name)) . '" to="' . ($tobare ? htmlspecialchars($to->bare()) : htmlspecialchars($to)) . '">' . (is_null($subject) ? '' : '<subject>' . htmlspecialchars($subject) . '</subject>') . '<body>' . htmlspecialchars($body) . '</body></message>');
		$this->log("sent <message> from {$from} to {$to}", true, PHP_COMPONENT_MESSAGE_INFO);
	}
public function sendMessage ( $ body , $ to , $ item = NULL , $ type = NULL , $ subject = NULL , $ tobare = false ) { $ to = new JID ( $ to ) ; $ this -> send ( '<message ' . ( is_null ( $ type ) ? ' ' : 'type="' . $ type . '" ' ) . 'from="' . ( is_null ( $ item ) ? ( $ from = $ this -> component_name ) : ( $ from = $ item . '@' . $ this -> component_name ) ) . '" to="' . ( $ tobare ? htmlspecialchars ( $ to -> bare ( ) ) : htmlspecialchars ( $ to ) ) . '">' . ( is_null ( $ subject ) ? '' : '<subject>' . htmlspecialchars ( $ subject ) . '</subject>' ) . '<body>' . htmlspecialchars ( $ body ) . '</body></message>' ) ; $ this -> log ( "sent <message> from {$from} to {$to}" , true , PHP_COMPONENT_MESSAGE_INFO ) ; }
Send a message stanza to some JID
Send a message stanza to some JID