public function execute()
    {
        $sendxmpp = $this->phpci->findBinary('sendxmpp');

        /*
         * Without recipients we can't send notification
         */
        if (count($this->recipients) == 0) {
            return false;
        }

        /*
         * Try to build conf file
         */
        $config_file = $this->phpci->buildPath . DIRECTORY_SEPARATOR . '.sendxmpprc';
        if (is_null($this->findConfigFile())) {
            file_put_contents($config_file, $this->getConfigFormat());
            chmod($config_file, 0600);
        }

        /*
         * Enabled ssl for connection
         */
        $tls = '';
        if ($this->tls) {
            $tls = ' -t';
        }

        $message_file = $this->phpci->buildPath . DIRECTORY_SEPARATOR . uniqid('xmppmessage');
        if ($this->buildMessage($message_file) === false) {
            return false;
        }

        /*
         * Send XMPP notification for all recipients
         */
        $cmd = $sendxmpp . "%s -f %s -m %s %s";
        $recipients = implode(' ', $this->recipients);

        $success = $this->phpci->executeCommand($cmd, $tls, $config_file, $message_file, $recipients);

        print $this->phpci->getLastOutput();

        /*
         * Remove temp message file
         */
        $this->phpci->executeCommand("rm -rf ".$message_file);

        return $success;
    }
public function execute()
    {
        $sendxmpp = $this->phpci->findBinary('sendxmpp');

        /*
         * Without recipients we can't send notification
         */
        if (count($this->recipients) == 0) {
            return false;
        }

        /*
         * Try to build conf file
         */
        $config_file = $this->phpci->buildPath . DIRECTORY_SEPARATOR . '.sendxmpprc';
        if (is_null($this->findConfigFile())) {
            file_put_contents($config_file, $this->getConfigFormat());
            chmod($config_file, 0600);
        }

        /*
         * Enabled ssl for connection
         */
        $tls = '';
        if ($this->tls) {
            $tls = ' -t';
        }

        $message_file = $this->phpci->buildPath . DIRECTORY_SEPARATOR . uniqid('xmppmessage');
        if ($this->buildMessage($message_file) === false) {
            return false;
        }

        /*
         * Send XMPP notification for all recipients
         */
        $cmd = $sendxmpp . "%s -f %s -m %s %s";
        $recipients = implode(' ', $this->recipients);

        $success = $this->phpci->executeCommand($cmd, $tls, $config_file, $message_file, $recipients);

        print $this->phpci->getLastOutput();

        /*
         * Remove temp message file
         */
        $this->phpci->executeCommand("rm -rf ".$message_file);

        return $success;
    }
public function execute ( ) { $ sendxmpp = $ this -> phpci -> findBinary ( 'sendxmpp' ) ; /*
         * Without recipients we can't send notification
         */ if ( count ( $ this -> recipients ) == 0 ) { return false ; } /*
         * Try to build conf file
         */ $ config_file = $ this -> phpci -> buildPath . DIRECTORY_SEPARATOR . '.sendxmpprc' ; if ( is_null ( $ this -> findConfigFile ( ) ) ) { file_put_contents ( $ config_file , $ this -> getConfigFormat ( ) ) ; chmod ( $ config_file , 0600 ) ; } /*
         * Enabled ssl for connection
         */ $ tls = '' ; if ( $ this -> tls ) { $ tls = ' -t' ; } $ message_file = $ this -> phpci -> buildPath . DIRECTORY_SEPARATOR . uniqid ( 'xmppmessage' ) ; if ( $ this -> buildMessage ( $ message_file ) === false ) { return false ; } /*
         * Send XMPP notification for all recipients
         */ $ cmd = $ sendxmpp . "%s -f %s -m %s %s" ; $ recipients = implode ( ' ' , $ this -> recipients ) ; $ success = $ this -> phpci -> executeCommand ( $ cmd , $ tls , $ config_file , $ message_file , $ recipients ) ; print $ this -> phpci -> getLastOutput ( ) ; /*
         * Remove temp message file
         */ $ this -> phpci -> executeCommand ( "rm -rf " . $ message_file ) ; return $ success ; }
Send notification message.
Send notification message .