def _send(self, server, texts, htmls, dryrun):
        """Sends the email using the configured settings.

        :arg server: the Server instance for the entire CI workflow.
        """
        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