Send out text message (of msgType: text)
488024
function sendTextMessage(recipientId, textToSend, token) {
      textMessageData = {
        text:textToSend
      }
      request({
        url: FB_MSG_URL,
        qs: {access_token:token},
        method: 'POST',
        json: {
          recipient: {id:recipientId},
          message: textMessageData,
        }
      }, function(error, response, body) {
        if (error) {
          node.log('Error sending text message: ', error);
        } else if (response.body.error) {
          node.log('Error: ', response.body.error);
        }
      });
    }
126147
def send_sms(self, text, **kw):
        

        params = {
            'user': self._user,
            'pass': self._passwd,
            'msg': text
        }

        kw.setdefault("verify", False)

        if not kw["verify"]:
            # remove SSL warning
            requests.packages.urllib3.disable_warnings(InsecureRequestWarning)

        res = requests.get(FreeClient.BASE_URL, params=params, **kw)
        return FreeResponse(res.status_code)
141842
def SendMessage(self, statement):
        """"""
        
        # The way messages are 'encapsulated' by Rekall is questionable, 99% of the
        # time it's way better to have a dictionary...shrug...
        message_type = statement[0]
        message_data = statement[1]        
        self.output.append({'type': message_type, 'data': message_data})
678102
def send_text(self):
        
        def run(*args):
            """Background process to send the text"""
            self.ws_client.send(json.dumps(self.options).encode('utf8'))

            time.sleep(TEN_MILLISECONDS)

        thread.start_new_thread(run, ())
858847
async def _send_plain_text(self, request: Request, stack: Stack):
        

        await self._send_text(request, stack, None)
264699
def send(self,text):
	""""""
	#print text
	self.s.write(text)
	time.sleep(0.001*len(text))
562358
def sendmess(self, msgtype, payload, flags=0, size=0, offset=0, timeout=0):
        

        flags |= self.flags
        assert not (flags & FLG_PERSISTENCE)

        with self._new_connection() as conn:
            ret, _, data = conn.req(
                msgtype, payload, flags, size, offset, timeout)

        return ret, data
258299
def send_message(self, message, icon_path=None):
        """"""
        icon_encoded_string = ''
        icon_extension = ''

        if icon_path is not None:
            icon_extension = os.path.splitext(icon_path)[1][1:]
            with open(icon_path, 'rb') as icon_file:
                icon_encoded_string = base64.b64encode(icon_file.read()).decode('ascii')

        self.request(EP_SHOW_MESSAGE, {
            'message': message,
            'iconData': icon_encoded_string,
            'iconExtension': icon_extension
        })
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)
53869
def send_sms(self, message, to, sender='elkme', options=[]):
        """"""
        sms = self.format_sms_payload(message=message,
            to=to,
            sender=sender,
            options=options)
        return self.query_api(sms)
796038
def send(self, to, from_, body):
        
        try:
            msg = self.client.sms.messages.create(
                body=body,
                to=to,
                from_=from_
                )
            print msg.sid
        except twilio.TwilioRestException as e:
            raise
1041115
def send(self, msg):
        ''''''
        app = self.app or current_app
        mailer = app.extensions['marrowmailer']
        mailer.start()
        if not hasattr(msg, '__iter__'):
            result = mailer.send(msg)
        else:
            result = map(lambda message: mailer.send(message), msg)
        mailer.stop()
        return result
911781
def sendMessage(self, data):
        
        opcode = BINARY
        if _check_unicode(data):
            opcode = TEXT
        self._sendMessage(False, opcode, data)
1023647
def send(self, message, *args, **kwargs):
        '''
        
        '''
        self._messages.put((message, args, kwargs), False)
338865
def _sendMsg(self, msg):
    """"""
    if not self.sock:
      self.connect()
    if not isinstance(msg, binary_type):
      msg = msg.encode("UTF-8")

    backoff = 0.001
    while True:
      try:
        self.sock.sendall(msg)
        break
      except socket.error:
        log.warning('Graphite connection error', exc_info = True)
        self.disconnect()
        time.sleep(random.uniform(0, 2.0*backoff))
        backoff = min(backoff*2.0, 5.0)
        self.connect()
696625
def send(self, messages):
        """"""

        tmpSms = SMS(to='', message='')
        if str(type(messages)) == str(type(tmpSms)):
            messages = [messages]

        xml_root = self.__init_xml('Message')
        wrapper_id = 0

        for m in messages:
            m.wrapper_id = wrapper_id
            msg = self.__build_sms_data(m)
            sms = etree.SubElement(xml_root, 'SMS')
            for sms_element in msg:
                element = etree.SubElement(sms, sms_element)
                element.text = msg[sms_element]

        # print etree.tostring(xml_root)
        response = clockwork_http.request(SMS_URL, etree.tostring(xml_root, encoding='utf-8'))
        response_data = response['data']

        # print response_data
        data_etree = etree.fromstring(response_data)

        # Check for general error
        err_desc = data_etree.find('ErrDesc')
        if err_desc is not None:
            raise clockwork_exceptions.ApiException(err_desc.text, data_etree.find('ErrNo').text)

        # Return a consistent object
        results = []
        for sms in data_etree:
            matching_sms = next((s for s in messages if str(s.wrapper_id) == sms.find('WrapperID').text), None)
            new_result = SMSResponse(
                sms = matching_sms,
                id = '' if sms.find('MessageID') is None else sms.find('MessageID').text,
                error_code = 0 if sms.find('ErrNo') is None else sms.find('ErrNo').text,
                error_message = '' if sms.find('ErrDesc') is None else sms.find('ErrDesc').text,
                success = True if sms.find('ErrNo') is None else (sms.find('ErrNo').text == 0)
            )
            results.append(new_result)

        if len(results) > 1:
            return results

        return results[0]
1081216
function sendMsg(that) {
        var msg, to, ids;

        // No msg sent.
        if (that.isDisabled()) return;

        msg = that.readTextarea();

        // Move cursor at the beginning.
        if (msg === '') {
            node.warn('Chat: message has no text, not sent.');
            return;
        }
        // Simplify things, if there is only one recipient.
        ids = that.recipientsIds;
        if (ids.length === 0) {
            node.warn('Chat: empty recipient list, message not sent.');
            return;
        }
        to = ids.length === 1 ? ids[0] : ids;
        that.writeMsg('outgoing', { msg: msg }); // to not used now.
        node.say(that.chatEvent, to, msg);
        // Make sure the cursor goes back to top.
        setTimeout(function() { that.textarea.value = ''; });
    }