mirror of
https://github.com/fastapi/full-stack-fastapi-template.git
synced 2026-11-03 12:29:42 +00:00
✨ Add react-email for email templates (#2421)
This commit is contained in:
@@ -24,7 +24,7 @@ class EmailData:
|
||||
|
||||
def render_email_template(*, template_name: str, context: dict[str, Any]) -> str:
|
||||
template_str = (
|
||||
Path(__file__).parent / "email-templates" / "build" / template_name
|
||||
Path(__file__).parent / "email-templates" / template_name
|
||||
).read_text()
|
||||
html_content = Template(template_str).render(context)
|
||||
return html_content
|
||||
|
||||
Reference in New Issue
Block a user