Creates a new message that is a reply to this message

        :param bool to_all: whether or not to replies to all the recipients
         instead to just the sender
        :return: new message
        :rtype: Message
429710
def reply(self, to_all=True):
        
        if not self.object_id or self.__is_draft:
            raise RuntimeError("Can't reply to this message")

        if to_all:
            url = self.build_url(self._endpoints.get('create_reply_all').format(
                id=self.object_id))
        else:
            url = self.build_url(
                self._endpoints.get('create_reply').format(id=self.object_id))

        response = self.con.post(url)
        if not response:
            return None

        message = response.json()

        # Everything received from cloud must be passed as self._cloud_data_key
        return self.__class__(parent=self, **{self._cloud_data_key: message})
890934
def deliver(to, message)
      if to.is_a?(Array)
        to.each { |t| @jabber.deliver(t, message) }
      else
        @jabber.deliver(to, message)
      end
    end
178970
def message(from, to, body, callback_url=nil)
      callback = callback_url ? {:StatusCallback => callback_url} : {}
      Twilio.post("/SMS/Messages", :body => {:From => from, :To => to, :Body => body}.merge(callback))
    end
243303
def send(self, message):
        
        for event in message.events:
            self.events.append(event)
        reply = riemann_client.riemann_pb2.Msg()
        reply.ok = True
        return reply
486089
def send(to, message, **kwargs):
    

    available_kwargs_keys = [
        'parse_mode',
        'disable_web_page_preview',
        'disable_notification',
        'reply_to_message_id',
        'reply_markup'
    ]

    available_kwargs = {
        k: v for k, v in kwargs.iteritems() if k in available_kwargs_keys
    }

    bot = telepot.Bot(settings.TELEGRAM_BOT_TOKEN)
    return bot.sendMessage(to, message, **available_kwargs)
685203
def reply(self,message,message_type):
        
        if message_type == MULTIPART:
            raise Exception("Unsupported reply type")
            
        super(Replier,self).send(message,message_type)
505099
def message(self, message=None):
        
        if message is not None:
            self.response_model.message = message
        return self.response_model.message
884094
def send(self, to, subject, body, reply_to=None, **kwargs):
        
        if self.provider == "SES":
            self.mail.send(to=to,
                           subject=subject,
                           body=body,
                           reply_to=reply_to,
                           **kwargs)
        elif self.provider == "FLASK-MAIL":
            msg = flask_mail.Message(recipients=to, subject=subject, body=body, reply_to=reply_to,
                                     sender=self.app.config.get("MAIL_DEFAULT_SENDER"))
            self.mail.send(msg)
580825
def send_reply_to(address, reply=EMPTY):
    
    _logger.debug("Sending reply %s to %s", reply, address)
    return sockets._sockets.send_reply_to(address, reply)
175742
def new_reply(cls, thread, user, content):
        
        msg = cls.objects.create(thread=thread, sender=user, content=content)
        thread.userthread_set.exclude(user=user).update(deleted=False, unread=True)
        thread.userthread_set.filter(user=user).update(deleted=False, unread=False)
        message_sent.send(sender=cls, message=msg, thread=thread, reply=True)
        return msg
745179
def message(self, message: types.Message):
        
        setattr(self, 'from_chat_id', message.chat.id)
        setattr(self, 'message_id', message.message_id)
        return self
704953
def sendmail(self, to, message):
        

        # If we were passed a bare string as the To: address, convert it to
        # a single element list.
        if isinstance(to, str):
            to = [ to, ]

        # Send one email with the appropriate recipient list.
        server = self._smtp_server()
        server.sendmail(self.get_rfc2822_address(), to, message)
        server.quit()
1262407
def got_response(self):
        
        return any(message.sender != self.initiator
                   for message in self.messages)
1155787
def from_raw_message(cls, rawmessage):
        """"""
        return AllLinkRecordResponse(rawmessage[2],
                                     rawmessage[3],
                                     rawmessage[4:7],
                                     rawmessage[7],
                                     rawmessage[8],
                                     rawmessage[9])
1176635
def send(self, message):
        
        if isinstance(message, dict):
            response = self.client.mail.send.post(request_body=message)
        else:
            response = self.client.mail.send.post(request_body=message.get())
        return response
1052920
def send_message_sync(
        self,
        message: Message,
        sender: str = None,
        recipients: RecipientsType = None,
        mail_options: Iterable[str] = None,
        rcpt_options: Iterable[str] = None,
        timeout: DefaultNumType = _default,
    ) -> SendmailResponseType:
        
        return self._run_sync(
            self.send_message,
            message,
            sender=sender,
            recipients=recipients,
            mail_options=mail_options,
            rcpt_options=rcpt_options,
            timeout=timeout,
        )
796022
def send_msg(template_id, to, reply_to, from, subject, optional = {})

      if optional[:attachments]
        upload(template_id, to, reply_to, from, subject, optional[:merge_fields], optional[:view_online], optional[:click_tracking],
               optional[:suppress_address], optional[:attachments], optional[:headers], optional[:reply_name], optional[:from_address])
      else
        params =  optional ? optional.clone : {}
        params[:template_id] =  template_id
        params[:to] =  to
        params[:reply_to] =  reply_to
        params[:from] =  from
        params[:subject] =  subject

        post @endpoint, params
      end
    end