My Account | Buy CometChat

documentation

sendMessageTo

sendMessageTo() allows you to dynamically send message (one-way) to a particular user. This message will not appear in the senders chat box screen.

The API

sendMessageTo($to,$message);

Sample Code

This function is ideally used in plugins to inform the user of an activity. The sender will not receive the same message.

include_once (cometchat/cometchat_init.php);
sendMessageTo($toID,"Would you like to have a Pizza?");