'Send the message.'

def _send_email(self, msg):

    mail = self.connect()
    for _ in range(self.tries):
        try:
            mail.sendmail(self._sender, self.recipients, msg.as_string())
            break
        except smtplib.SMTPServerDisconnected:
            _LOGGER.warning('SMTPServerDisconnected    sending    mail:    retrying    connection')
            mail.quit()
            mail = self.connect()
        except smtplib.SMTPException:
            _LOGGER.warning('SMTPException    sending    mail:    retrying    connection')
            mail.quit()
            mail = self.connect()
    mail.quit()
