exporters icon indicating copy to clipboard operation
exporters copied to clipboard

Notifications mail module with templating support

Open bbotella opened this issue 8 years ago • 3 comments

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.

bbotella avatar Jun 24 '16 11:06 bbotella

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. :grinning:

eliasdorneles avatar Jul 11 '16 19:07 eliasdorneles

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?

bbotella avatar Jul 12 '16 15:07 bbotella

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. =)

eliasdorneles avatar Jul 12 '16 15:07 eliasdorneles