

def send_template_message(template=None, ctx=None, *args, **kwargs):
    "\n    Send a templated e-mail using a similar signature as Flask-Mail:\n    http://pythonhosted.org/Flask-Mail/\n\n    Except, it also supports template rendering. If you want to use a template\n    then just omit the body and html kwargs to Flask-Mail and instead supply\n    a path to a template. It will auto-lookup and render text/html messages.\n\n    Example:\n        ctx = {'user': current_user, 'reset_token': token}\n        send_template_message('Password reset from Foo', ['you@example.com'],\n                              template='user/mail/password_reset', ctx=ctx)\n\n    :param subject:\n    :param recipients:\n    :param body:\n    :param html:\n    :param sender:\n    :param cc:\n    :param bcc:\n    :param attachments:\n    :param reply_to:\n    :param date:\n    :param charset:\n    :param extra_headers:\n    :param mail_options:\n    :param rcpt_options:\n    :param template: Path to a template without the extension\n    :param context: Dictionary of anything you want in the template context\n    :return: None\n    "
    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(*template, **kwargs)
    return None

dataset/ETHPy150Open nickjj/build-a-saas-app-with-flask/catwatch/lib/flask_mailplus.py send_template_message/VarMisuse@125/565 `args`->`template`