def send_template_message(template=None, ctx=None, *args, **kwargs):
    if ctx is None:
        ctx = {}

    if template is not None:
        if 'body' in kwargs:
            raise Exception(_('You cannot have both a template and body arg.'))
        elif 'html' in kwargs:
            raise Exception(_('You cannot have both a template and body arg.'))

        kwargs['body'] = _try_renderer_template(template, **ctx)
        kwargs['html'] = _try_renderer_template(template, ext='html', **ctx)

    mail.send_message(*args, **kwargs)

    return None
Send a templated e-mail using a similar signature as Flask-Mail:
dataset/ETHPy150Open nickjj/build-a-saas-app-with-flask/catwatch/lib/flask_mailplus.py/send_template_message