Mira aquí tienen la implementación de SendMessage
Código PHP:
function SendMessage($to, $type = "normal", $id = NULL, $content = NULL, $payload = NULL)
{
if ($to && is_array($content))
{
if (!$id)
{
$id = $type . "_" . time();
}
$content = $this->_array_htmlspecialchars($content);
$xml = "<message to='$to' type='$type' id='$id'>\n";
if ($content['subject'])
{
$xml .= "<subject>" . $content['subject'] . "</subject>\n";
}
if ($content['thread'])
{
$xml .= "<thread>" . $content['thread'] . "</thread>\n";
}
$xml .= "<body>" . $content['body'] . "</body>\n";
$xml .= $payload;
$xml .= "</message>\n";
if ($this->SendPacket($xml))
{
return TRUE;
}
else
{
$this->AddToLog("ERROR: SendMessage() #1");
return FALSE;
}
}
else
{
$this->AddToLog("ERROR: SendMessage() #2");
return FALSE;
}
}
Salu2