Closed kucera-lukas closed 3 years ago
Take a look at this improvement, is it sufficient?
I have also removed some of the os
checks because that is already done by pydantic
DirectoryPath
.
Yes, you are right at first it gets a bit complicated, to have field html and body. But if you properly set it up, this won't be a big problem. Your workaround also seems to be meaningful. thank you for your additional changes. Thanks for your work.Highly appreciated your work!
@kucera-lukas Thank you a lot again for your work! it is released available in 0.4.0.
Hi,
I've been using this library for a few weeks and ran into some issues with the jinja2 integration.
1) if ConnectionConfig is not instantiated in project parent directory the template validator silently fails and returns None. This results in very confusing error messages because user is not notified about it.
This has been improved so there is proper directory validation and template engine creation is done separately via a method.
2) There are 3 ways to send data with MessageSchema - via body (no jinja2), html or body (with jinja2). The combination of this with the subtype argument is pretty confusing because it is not very well documented so sometimes emails end up looking very differently from what we would expect.
Created a separate jinja2 argument (template_body) so user knows which argument to use whether they're using jinja2 or not.