Created
August 19, 2021 18:08
-
-
Save souravs17031999/879f496f1e5b5a18458d43738dd30703 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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