'Build and send a message to a user.
Will send plain text normally, or will build a multipart HTML message
with inline image attachments if images config is defined, or will
build a multipart HTML if html config is defined.'

def send_message(self, message='', **kwargs):

    subject = kwargs.get(ATTR_TITLE, ATTR_TITLE_DEFAULT)
    data = kwargs.get(ATTR_DATA)
    if data:
        if (ATTR_HTML in data):
            msg = _build_html_msg(message, data[ATTR_HTML], images=data.get(ATTR_IMAGES))
        else:
            msg = _build_multipart_msg(message, images=data.get(ATTR_IMAGES))
    else:
        msg = _build_text_msg(message)
    msg['Subject'] = subject
    msg['To'] = ','.join(self.recipients)
    if self._sender_name:
        msg['From'] = '{}    <{}>'.format(self._sender_name, self._sender)
    else:
        msg['From'] = self._sender
    msg['X-Mailer'] = 'HomeAssistant'
    msg['Date'] = email.utils.format_datetime(dt_util.now())
    msg['Message-Id'] = email.utils.make_msgid()
    return self._send_email(msg)
