Sends a SMS message.

@param \SimpleSoftwareIO\SMS\OutgoingMessage $message
510857
public function send(OutgoingMessage $message)
    {
        $composeMessage = $message->composeMessage();

        foreach ($message->getTo() as $to) {
            $data = [
                'to'          => $to,
                'messagebody' => $composeMessage,
            ];

            $this->buildBody($data);

            $this->postRequest();
        }
    }
299994
public void sendMessage(Message message) {
    OutgoingPacket opk = new OutgoingPacket(REQID.zeroREQID, message);
    socketChannelHelper.sendPacket(opk);
  }
1069376
public function logMessage(Message $message) {
        foreach($this->logger as $logger) {
            $logger->logMessage($message);
        }
    }
1319865
public function send(OutgoingMessage $message)
    {
        foreach ($message->getTo() as $to)
        {
            $parameters = array(
                array(
                    'token' => $this->token,
                    'msisdn' => $to,
                    'message' => $message->composeMessage()
                )
            );

            $this->client->__call($this->service, $parameters);
        }

        return $message;
    }
814757
def Send(self, message):
    
    if not self.outgoing:
      raise NotConfigured("Send address not provided.")
    self.outgoing.InsertMessage(message)
277945
public function sendMessage(Message $message): void
    {
        // Ensure the message will always be sent to the default channel if asked for.
        if ($this->options['sticky_channel']) {
            $message->setChannel($this->options['channel']);
        }

        $payload = $this->preparePayload($message);

        $encoded = \json_encode($payload, JSON_UNESCAPED_UNICODE);

        if (false === $encoded) {
            throw new \RuntimeException(\sprintf('JSON encoding error %s: %s', \json_last_error(), \json_last_error_msg()));
        }

        $this->httpClient->post('', [], $encoded);
    }
926498
public function reply ($message) {
		// Make sure we actually have a text to reply to
		if (!$this->inbound_message) {
			return false;
		}

		return $this->sendText($this->from, $this->to, $message);
	}
516523
public function send(Message $message)
    {
        $rawMessage = $this->getMessageEncoder()->encode($message);

        // test if we need to split the message to multiple chunks
        // chunkSize == 0 allows for an unlimited packet-size, and therefore
        // disables chunking
        if ($this->chunkSize && strlen($rawMessage) > $this->chunkSize) {
            return $this->sendMessageInChunks($rawMessage);
        }

        // send message in one packet
        $this->write($rawMessage);

        return 1;
    }
1179368
public function sendText (Type\Text $message)
    {
        $this->sendReply(
            $this->buildMessage(
                [
                    'MsgType' => $message->getType(),
                    'Content' => $message->getContent(),
                ]
            )
        );
    }
734243
public function send(string $subject, string $message): void
    {
        $this->getMailer()
            ->send(
                $this->getMessage($subject, $message)
            )
        ;
    }
1170501
public function send(OutgoingMessage $message)
    {
        $from = $message->getFrom();
        $composeMessage = $message->composeMessage();

        $numbers = $message->getToWithCarriers();

        if (count($numbers) > 1) {
            $endpoint = '/send-sms-multiple';
            $data = [
                'sendSmsMultiRequest' => ['sendSmsRequestList' => []],
            ];

            foreach ($numbers as $key => $item) {
                array_push($data['sendSmsMultiRequest']['sendSmsRequestList'],
                    $this->generateMessageBody($from, $item, $composeMessage));
            }
        } else {
            $endpoint = '/send-sms';
            $data = [
                'sendSmsRequest' => $this->generateMessageBody($from, $numbers[0], $composeMessage),
            ];
        }

        $this->buildCall($endpoint);
        $this->buildBody($data);

        $this->postRequest();
    }
582590
private function sendMessage($receiver, $message)
    {
        $id = null;

        switch ($message->type)
        {
            case 'text':
                $id = $this->broadcast
                        ? $this->gateway()->sendBroadcastMessage($receiver, $message->message)
                        : $this->gateway()->sendMessage($receiver, $message->message);
                break;
            case 'image':
                $id = $this->broadcast
                        ? $this->gateway()->sendBroadcastImage($receiver, $message->file, false, $message->filesize, $message->hash, $message->caption)
                        : $this->gateway()->sendMessageImage($receiver, $message->file, false, $message->filesize, $message->hash, $message->caption);
                break;
            case 'audio':
                $id = $this->broadcast
                        ? $this->gateway()->sendBroadcastAudio($receiver, $message->file, false, $message->filesize, $message->hash)
                        : $this->gateway()->sendMessageAudio($receiver, $message->file, false, $message->filesize, $message->hash);
                break;
            case 'video':
                $id = $this->broadcast
                        ? $this->gateway()->sendBroadcastVideo($receiver, $message->file, false, $message->filesize, $message->hash, $message->caption)
                        : $this->gateway()->sendMessageVideo($receiver, $message->file, false, $message->filesize, $message->hash, $message->caption);
                break;
            case 'location':
                $id = $this->broadcast 
                        ? $this->gateway()->sendBroadcastLocation($receiver, $message->longitude, $message->latitude, $message->caption, $message->url)
                        : $this->gateway()->sendMessageLocation($receiver, $message->longitude, $message->latitude, $message->caption, $message->url);
                break;
            case 'vcard':
                $id = $this->broadcast 
                        ? $this->gateway()->sendBroadcastVcard($receiver, $message->name, $message->vcard->show())
                        : $this->gateway()->sendVcard($receiver, $message->name, $message->vcard->show());
                break;
            default:
                            
            break;
        }

        while ($this->gateway()->pollMessage());

        return $id;
    }
974235
protected function send($message)
	{
		$message = $this->encodeMessage($message);
		$this->ws->send($message);
	}
1262553
protected function _send($message, &$failedRecipients = null)
    {
        $this->_message = $message;

        return count($message->getTo()) + count($message->getCc()) + count($message->getBcc());
    }
922384
private function notify($message)
    {
        if ($this->output !== null) {
            $this->output->writeln("<info>{$message}</info>");
        }

        $this->app['logger.system']->info($message, ['event' => 'cron']);
    }
403146
public function logMessage($message)
    {
        $this->logger->info(strip_tags($message));

        if ($this->sendToBrowser) {
            $this->sendMessageToBrowser($message);
        }

        if ($this->sendToCli) {
            $this->sendMessageToCli($message);
        }
    }
491420
public static function send($message)
    {
        if (is_array($message)) {
            $message = new Message($message);
        }

        return static::getMailer()->send($message->getOriginal());
    }