Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notifications mail module with templating support #295

Open
bbotella opened this issue Jun 24, 2016 · 3 comments
Open

Notifications mail module with templating support #295

bbotella opened this issue Jun 24, 2016 · 3 comments

Comments

@bbotella
Copy link
Contributor

It would be nice to support a standard mail notifications module, with support for templating (maybe using jinja?).

This should be a different module than current SES notifications module, and provide a nice interface to send messages configuring proper sntp info. Templates option should support both template file path, or the template itself json formatted.

@eliasdorneles
Copy link
Contributor

eliasdorneles commented Jul 11, 2016

The current SES notifications module already supports jinja2, so it's okay to have it as dependency.
It would be nice to do some design work before starting this new notifications module, because it's not clear to me what exactly we'd want to parameterize it.

Perhaps instead of creating a new module, we could simply change the current one, removing the coupling with SES (i.e., allowing to configure the mechanism of sending the email notification) and providing hooks for subclasses to customize the templates. 😀

@bbotella
Copy link
Contributor Author

I like the one to fit them all approach. And, about the jinja template... What about adding the possibility of loading a text file from local disk/url?

@eliasdorneles
Copy link
Contributor

I think YAGNI applies here. :)

As an user, I wouldn't like to have to write templates in the first place.
As a developer, I would like to have complete control of how to load the template, so I can put it whenever I want.

So, it's best to start with hooks for subclasses to customize the templates, and let future usage to discover the most common and helpful cases. =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants