public function send(MessageInterface $message, $skipErrors = true) {

        $mobitex = $this->getClient();
        
        foreach ($message->getRecipient() as $recipient) {
            try {
                $mobitex->sendMessage($recipient, $message->getText());
            }
            catch (Exception $e) {
                $this->addError(new SendingError($recipient, $e->getCode(), $e->getMessage()));
                if (!$skipErrors) {
                    throw new \RuntimeException($e->getMessage(), $e->getCode());
                }
            }
        }
        return $this->getErrors()->count() === 0;
    }
public function send(MessageInterface $message, $skipErrors = true) {

        $mobitex = $this->getClient();
        
        foreach ($message->getRecipient() as $recipient) {
            try {
                $mobitex->sendMessage($recipient, $message->getText());
            }
            catch (Exception $e) {
                $this->addError(new SendingError($recipient, $e->getCode(), $e->getMessage()));
                if (!$skipErrors) {
                    throw new \RuntimeException($e->getMessage(), $e->getCode());
                }
            }
        }
        return $this->getErrors()->count() === 0;
    }
public function send ( MessageInterface $ message , $ skipErrors = true ) { $ mobitex = $ this -> getClient ( ) ; foreach ( $ message -> getRecipient ( ) as $ recipient ) { try { $ mobitex -> sendMessage ( $ recipient , $ message -> getText ( ) ) ; } catch ( Exception $ e ) { $ this -> addError ( new SendingError ( $ recipient , $ e -> getCode ( ) , $ e -> getMessage ( ) ) ) ; if ( ! $ skipErrors ) { throw new \ RuntimeException ( $ e -> getMessage ( ) , $ e -> getCode ( ) ) ; } } } return $ this -> getErrors ( ) -> count ( ) === 0 ; }
Send message through SmsCenter.pl gateway
@param SmsMessageModel $message
@return bool
Send message through SmsCenter . pl gateway