[Building Sakai] Using the EmailTemplateService

David Horwitz david.horwitz at uct.ac.za
Sun Jan 3 23:42:36 PST 2010


You Might have a look at the Notification manager in site-manage:

https://source.sakaiproject.org/svn/site-manage/trunk/site-manage-impl/impl/src/java/org/sakaiproject/sitemanage/impl/ETSUserNotificationProviderImpl.java

This loads them from an xml file and saves them. Suggestions to make
this more elegant welcomed :-)

D

On 01/04/2010 09:37 AM, Aaron Zeckoski wrote:
> 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"
>>
>>     
>
>
>   


More information about the sakai-dev mailing list