Skip to content

Instantly share code, notes, and snippets.

@souravs17031999
Created August 19, 2021 18:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save souravs17031999/879f496f1e5b5a18458d43738dd30703 to your computer and use it in GitHub Desktop.
Save souravs17031999/879f496f1e5b5a18458d43738dd30703 to your computer and use it in GitHub Desktop.
def generate_mail_content(template_name, **template_vars):
templateLoader = jinja2.FileSystemLoader(searchpath="templates")
templateEnv = jinja2.Environment(loader=templateLoader)
template = templateEnv.get_template(template_name)
return template.render(**template_vars)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment