email_send.py
Python script, ASCII text executable
1import config 2from jinja2 import Environment, FileSystemLoader, select_autoescape 3 4 5def render_email_template(template, **kwargs): 6env = Environment( 7loader=FileSystemLoader("email_templates"), 8autoescape=select_autoescape(["html", "xml"]) 9) 10template = env.get_template(template) 11return template.render(**kwargs, config=config) 12