public function sendMessage(CNabuMessagingServiceList $nb_service_list, $to, $cc, $bcc, $subject, $body_html, $body_text, $attachments)
    {
        $retval = false;

        $nb_service_list->iterate(
            function($key, CNabuMessagingService $nb_service)
            use (&$retval, $to, $cc, $bcc, $subject, $body_html, $body_text, $attachments)
        {
            $nb_interface = $this->prepareServiceInterface($nb_service);
            $nb_interface->send($to, $cc, $bcc, $subject, $body_html, $body_text, $attachments);
            $retval |= true;

            return true;
        });

        return $retval;
    }
public function sendMessage(CNabuMessagingServiceList $nb_service_list, $to, $cc, $bcc, $subject, $body_html, $body_text, $attachments)
    {
        $retval = false;

        $nb_service_list->iterate(
            function($key, CNabuMessagingService $nb_service)
            use (&$retval, $to, $cc, $bcc, $subject, $body_html, $body_text, $attachments)
        {
            $nb_interface = $this->prepareServiceInterface($nb_service);
            $nb_interface->send($to, $cc, $bcc, $subject, $body_html, $body_text, $attachments);
            $retval |= true;

            return true;
        });

        return $retval;
    }
public function sendMessage ( CNabuMessagingServiceList $ nb_service_list , $ to , $ cc , $ bcc , $ subject , $ body_html , $ body_text , $ attachments ) { $ retval = false ; $ nb_service_list -> iterate ( function ( $ key , CNabuMessagingService $ nb_service ) use ( & $ retval , $ to , $ cc , $ bcc , $ subject , $ body_html , $ body_text , $ attachments ) { $ nb_interface = $ this -> prepareServiceInterface ( $ nb_service ) ; $ nb_interface -> send ( $ to , $ cc , $ bcc , $ subject , $ body_html , $ body_text , $ attachments ) ; $ retval |= true ; return true ; } ) ; return $ retval ; }
Send a Message directly.
@param CNabuMessagingServiceList $nb_service_list List of Services to be used to post the message.
@param CNabuUser|CNabuUserList|string|array $to A User or User List instance, an inbox as string or an array
of strings each one an inbox, to send TO.
@param CNabuUser|CNabuUserList|string|array $cc A User or User List instance, an inbox as string or an array
of strings each one an inbox, to send in Carbon Copy.
@param CNabuUser|CNabuUserList|string|array $bcc A User or User List instance, an inbox as string or an array
of strings each one an inbox, to send in Blind Carbon Copy.
@param string $subject Subject of the message if any.
@param string $body_html Body of the message in HTML format.
@param string $body_text Body of the message in text format.
@param array $attachments An array of attached files to send in the message.
@return bool Returns true if the message was sent.
@throws ENabuMessagingException Raises an exception if something is wrong.
Send a Message directly .