Use this method to send text messages. On success, the sent Message is returned.
15418
def send_message(self, text, chat_id, reply_to_message_id=None, disable_web_page_preview=False, reply_markup=None):
        
        self.logger.info('sending message "%s"', format(text.replace('\n', '\\n')))
        payload = dict(text=text,
                       chat_id=chat_id,
                       reply_to_message_id=reply_to_message_id,
                       disable_web_page_preview=disable_web_page_preview,
                       reply_markup=reply_markup)
        return Message.from_api(self, **self._get('sendMessage', payload))
120238
def send_messages(self, messages):
        
        if not messages:
            return
        new_conn_created = self.open()
        if not self.connection:
            # We failed silently on open(). Trying to send would be pointless.
            return
        num_sent = 0
        for message in messages:
            sent = self._send(message)
            if sent:
                num_sent += 1
        if new_conn_created:
            self.close()
        return num_sent
1135105
public void send(Message message)
  {
    Transport smtp = null;

    try {
      smtp = _session.getTransport("smtp");

      smtp.connect();

      smtp.send(message, _to);

      log.fine(this + " sent mail to " + _to[0]);
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      throw new RuntimeException(e);
    } finally {
      try {
        if (smtp != null)
          smtp.close();
      } catch (Exception e) {
        log.log(Level.FINER, e.toString(), e);
      }
    }
  }
961792
async def send(self, message_type, message_content, timeout=None):
        
        return await self._sender.send(
            message_type, message_content, timeout=timeout)
1355798
public void send(String destName, String messageText)
            throws MessagingException {
        this.send(destName, (Serializable) messageText);
    }
611094
def send_message(msg)
      # Build the message and get it's size
      message = msg.serialize_to_string
      message_size = [message.length].pack('N')

      # Try to send the message
      try_again = true
      begin
        data = ""
        @ssl_client.write(message_size + message)
        @ssl_client.readpartial(1000,data)
      rescue
        # Sometimes our connection might drop or something, so
        # we'll reconnect to the unit and try to send the message again.
        if try_again
          try_again = false
          connect_to_unit
          retry
        else
          # Looks like we couldn't connect to the unit after all.
          puts "message not sent"
        end
      end

      return data
    end
1195534
def send(self, message):
        
        future = self.post(message)
        future.join()
        return future.result
1297343
public function send()
    {
        $response = $this->sendApiCall(self::ACTION_CREATE, $this->getCreateUrl());

        if (!isset($response->getBody()['_embedded']['items'])) {
            throw new Exception('Invalid response returned from server', Exception::INVALID_RESPONSE);
        }

        $result = array();
        foreach ($response->getBody()['_embedded']['items'] as $item) {
            $result[] = $sms = new NumberLookup($this->client, $this->factory);
            $sms->setFields($item);
        }

        return $result;
    }
1023647
def send(self, message, *args, **kwargs):
        '''
        
        '''
        self._messages.put((message, args, kwargs), False)
779980
public void sendTextMessage(String message) {
		MessageEnvelope envelope = new MessageEnvelope();
		ReceivedMessage body = new ReceivedMessage();

		body.setText(message);
		envelope.setMessage(body);
		envelope.setSender(new User(facebookMockId));

		System.out.println("Sending message: [" + message + "] as user : ["
				+ facebookMockId + "].");
		forward(envelope);
		System.out.println("Sent!");
	}
725320
def _sendMessage(self, msg):
        
        if not msg:
            return
        msg = self._collapseMsg(msg)
        self.sendStatus(msg)
1241285
def send_data(self, message):
        '''
            
        '''
        #logger.debug("TX:\n%s", json.dumps(message, indent=2))
        data = json.dumps(message).encode('utf-8') + b'\n'
        self.transport.write(data)
927571
async def message(request):
    

    msg = request.get('msg')
    if msg is None:
        return request.text("To send a message, go to 0.0.0.0:8000/"
                            "message/?msg='insert message here'.")
    await app.webhook.send(msg)
    return response.text("Send.")
818216
public void sendMessage(String text) throws NotConnectedException, InterruptedException {
        Message message = createMessage();
        message.setBody(text);
        connection.sendStanza(message);
    }
281301
def send_text(self, text, **options):
        
        return self.bot.send_message(self.id, text, **options)
607511
public ChatMessage sendMessage(String text) {
        if (text != null && !text.isEmpty()) {
            ChatMessage message = new ChatMessage(self, text);
            eventManager.fireRemoteEvent(sendEvent, message);
            return message;
        }
        
        return null;
    }
963192
def deliver
      xml = Clockwork::XML::SMS.build_multiple( self.messages )
      http_response = Clockwork::HTTP.post( Clockwork::API::SMS_URL, xml, @use_ssl )
      responses = Clockwork::XML::SMS.parse_multiple( self.messages, http_response )
    end