I have a controller's method which renders a template. This works fine to render the template within my .gsp view.
I am also using the mail-plugin, and I would like to used the same controller's function to render the template by email, hence populating some email with it.
I know how to do that from a .gsp view via Ajax request but do not know any way to do that from within a controller or a service. The idea would be to use my controller's action more like a function, take the rendered teplate and populate my email with it. Also, my controller's action needs to have some 'params' properties to work properly.
Any suggestion most welcome.
Regards,