Closed nsankar90 closed 2 years ago
Hi thanks for your nice words, they mean a lot. Actually what I was thinking is you could store them as a string then with the help of jinja you can map values, is that solve your case?
So typically jinja works with both strings and template files, and fastapi mail is such that you have access to both, so storing it as a text in the database would work, just remember that the css has to be embedded in the string text for it to be styled properly.
Thanks for your help @maestro-1. I think we both answered questions, closing the issue.
Thanks for the wonderful package team,
Quick question Is it possible to fetch the template from a database to send mail to the user Every customers have a different level of access permissions so instead of keeping it in folder I thought of saving it in database.
I even write it as a HTML file and used it in the code it worked well for me, Is there any other better way you could suggest.
Many thanks in advance