|
From: <jue...@we...> - 2004-07-21 12:38:30
|
That's already pretty easy: You can generate the email text with the = "mergeTemplateIntoString" of Spring's VelocityTemplateUtils helper, and = pass the result String into SimpleMailMessage's or MimeMessageHelper's = setText methods. 1 line to render the template (passing in a model Map), = 1 line to use it as email text for a given message. Juergen -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of Colin Sampaleanu Sent: Wednesday, July 21, 2004 1:36 PM To: spr...@li... Subject: Re: [Springframework-developer] E-Mail Templating Support It seems like a good number of the relatively complex j2ee apps=20 eventually end up rolling their own version of something like this (I=20 know we did at one of my last gigs, although that was before spring), so = if you can come up with a decent abstraction this would be worthwhile. Rob Harrop wrote: > I have been thinking of adding templated e-mail support to the mail=20 > package in Spring. In this way you can create the body of the mail as=20 > a Velocity template, and have data passed into the mail at runtime to=20 > customize it. I need to think a little more about how this would be=20 > implemented but I think the idea is sound. What does everyone else = think? > > =20 > > Rob > ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=3D4721&alloc_id=3D10040&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |