[Building Sakai] Using the EmailTemplateService

Aaron Zeckoski aaronz at vt.edu
Sun Jan 3 23:37:27 PST 2010


Mostly just the javadocs really. :-)

The simplest way to do this would be to create a spring bean (or use
an existing one) with an init method and then call
EmailTemplateService.saveTemplate(EmailTemplate emailTemplate) with
the content of your template. This will store the template which you
can then use from then on. You could check the date on the template
file(s) to see if it had been updated and then update the template(s)
in the database. There isn't anything to do this for you in the
service though so you will have to write some code to handle it.

Hope that helps.
-AZ



On Mon, Jan 4, 2010 at 3:55 AM, Steve Swinsburg
<steve.swinsburg at gmail.com> wrote:
> Hi all,
>
> Are there any docs on how to use the EmailTemplateService?
>
> For example, I want to be able to define a template and replacement variables for an email that my tool is to send, and then abstract that out into a file somewhere that can be internationalised. Is there some way to register the new templates that I create with the ETS via Spring?
>
> thanks,
> Steve
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>



-- 
Aaron Zeckoski (azeckoski (at) vt.edu)
Senior Research Engineer - CARET - University of Cambridge
https://twitter.com/azeckoski - http://www.linkedin.com/in/azeckoski
http://aaronz-sakai.blogspot.com/ - http://tinyurl.com/azprofile


More information about the sakai-dev mailing list