Sends the envelope using a freshly created SMTP connection. *args*
        and *kwargs* are passed directly to :py:class:`envelopes.conn.SMTP`
        constructor.

        Returns a tuple of SMTP object and whatever its send method returns.
763525
def send(self, *args, **kwargs):
        """"""
        conn = SMTP(*args, **kwargs)
        send_result = conn.send(self)
        return conn, send_result
300447
async def send_message(self, *args, **kwargs):
        
        message = await self._client.send_message(
            self._input_chat, *args, **kwargs)

        self._outgoing.add(message.id)
        self._last_outgoing = message.id
        return message
361092
def send(self, sender: PytgbotApiBot):
        
        return sender.send_invoice(
            # receiver, self.media, disable_notification=self.disable_notification, reply_to_message_id=reply_id
            title=self.title, description=self.description, payload=self.payload, provider_token=self.provider_token, start_parameter=self.start_parameter, currency=self.currency, prices=self.prices, chat_id=self.receiver, reply_to_message_id=self.reply_id, provider_data=self.provider_data, photo_url=self.photo_url, photo_size=self.photo_size, photo_width=self.photo_width, photo_height=self.photo_height, need_name=self.need_name, need_phone_number=self.need_phone_number, need_email=self.need_email, need_shipping_address=self.need_shipping_address, send_phone_number_to_provider=self.send_phone_number_to_provider, send_email_to_provider=self.send_email_to_provider, is_flexible=self.is_flexible, disable_notification=self.disable_notification, reply_markup=self.reply_markup
        )
913662
def send(self, **kwargs):
        
        return_full_object = kwargs.get('return_full_object', False)
        _verbose = kwargs.get('_verbose', False)
        traversal = kwargs.get('traversal', None)
        timeout = kwargs.get('_timeout', 5)
        self.output['url'] = self.render_url()
        with VerboseContextManager(verbose=_verbose):
            try:
                resp = Response(self.action.format(), request(timeout=timeout, **self.output), traversal)
            except HTTPError as err:
                raise ResponseException(self.action.format(), err)
            except socket.timeout:
                raise RequestTimeout(functools.partial(self.send, **kwargs))
            except URLError as err:
                if isinstance(err.reason, socket.timeout):
                    raise RequestTimeout(functools.partial(self.send, **kwargs))
                else:
                    raise

        if return_full_object:
            return resp
        else:
            return resp.read()
159221
def _send(self, server, texts, htmls, dryrun):
        
        import smtplib
        from email.mime.multipart import MIMEMultipart
        from email.mime.text import MIMEText

        # Create message container - the correct MIME type is multipart/alternative.
        emsg = MIMEMultipart('alternative')
        emsg['Subject'] = self.subject
        emsg['From'] = self.sender
        emsg['To'] = ', '.join(self.to)

        # Create the body of the message (a plain-text and an HTML version).
        self.text = '\n'.join(texts) if isinstance(texts, list) else texts
        self.html = """
        <html>
          <head></head>
          <body>
            {}  
          </body>
        </html>
        """.format('\n'.join(htmls) if isinstance(htmls, list) else htmls)

        # Record the MIME types of both parts - text/plain and text/html.
        part1 = MIMEText(self.text, 'plain')
        part2 = MIMEText(self.html, 'html')

        # Attach parts into message container.
        # According to RFC 2046, the last part of a multipart message, in this case
        # the HTML message, is best and preferred.
        emsg.attach(part1)
        emsg.attach(part2)

        # Send the message via the configured SMTP server from ANCLE global configuration.
        if not dryrun:
            s = smtplib.SMTP(server.settings.gateway)
            s.sendmail(self.sender, self.to, emsg.as_string())
            s.quit()

        self.sent = True
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()
841490
def send(self, envelope):
        """"""
        if not self.is_connected:
            self._connect()

        msg = envelope.to_mime_message()
        to_addrs = [envelope._addrs_to_header([addr]) for addr in envelope._to + envelope._cc + envelope._bcc]

        return self._conn.sendmail(msg['From'], to_addrs, msg.as_string())
1000727
async def send_message(  # type: ignore
        self, request: str, response_expected: bool, **kwargs: Any
    ) -> Response:
        
        headers = dict(self.DEFAULT_HEADERS)
        headers.update(kwargs.pop("headers", {}))

        response = await self.client.fetch(
            self.endpoint, method="POST", body=request, headers=headers, **kwargs
        )

        return Response(response.body.decode(), raw=response)
102043
def send_mail(template, to, **kwargs):
    

    def cb():
        return mail.send(to=to, template=template, **kwargs)

    return signals.send_mail(cb, data={"to": to, "template": template, "kwargs": kwargs})
893551
async def send_mail(
        self, sender, recipients, message, mail_options=None, rcpt_options=None
    ):
        
        return await self.sendmail(
            sender, recipients, message, mail_options, rcpt_options
        )
200893
async def send_request(self, method, args=()):
        ''''''
        message, event = self.connection.send_request(Request(method, args))
        return await self._send_concurrent(message, event, 1)
812261
def __reply(self, reply, args, kwargs):
        
        binding = self.method.binding.input
        msg = binding.get_message(self.method, args, kwargs)
        log.debug('inject (simulated) send message:\n%s', msg)
        binding = self.method.binding.output
        return self.succeeded(binding, reply)
819255
async def send_message(self, *args, **kwargs):
        
        return await self._client.send_message(
            self.input_entity, *args, **kwargs)
1263367
def send_email(self, to, subject, content, files=None):
        
        msg = EmailSender._construct_msg(self, to, subject, content, files=files)
        try:
            self.smtp.sendmail(self.from_, to, str(msg))
        except:
            self.login()
            self.smtp.sendmail(self.from_, to, str(msg))
216953
def send(mail, server='localhost'):
    
    sender = mail.get_sender()
    rcpt = mail.get_receipients()
    session = smtplib.SMTP(server)
    message = MIMEMultipart()
    message['Subject'] = mail.get_subject()
    message['From'] = mail.get_sender()
    message['To'] = ', '.join(mail.get_to())
    message['Cc'] = ', '.join(mail.get_cc())
    message.preamble = 'Your mail client is not MIME aware.'

    body = MIMEText(mail.get_body().encode("utf-8"), "plain", "utf-8")
    body.add_header('Content-Disposition', 'inline')
    message.attach(body)

    for filename in mail.get_attachments():
        message.attach(_get_mime_object(filename))

    session.sendmail(sender, rcpt, message.as_string())
135042
def send(self, command: str, **kwargs: Any) -> None:
        
        packed_command = pack_command(command, **kwargs).strip()
        self.send_raw(packed_command)
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