to render this template i tried to use in html the g.render
and everytime that, the job is executed
i get this exception
No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.
so, what can i do to render the template into this serivce??
This post has NOT been accepted by the mailing list yet.
Here is the sample code where you can render your template in email body
html g.render(template:"sendConfirmationMail", model:[.............])
and you should make sure that you have given right template path.
In the above example, _sendConfirmationMail.gsp is placed in the controller where I'm using it. if you are calling the template form different controller you should give relative path of that template( ex :"/<controllerName>/sendConfirmationMail")