You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Robert Hailey <ro...@cmediacorp.com> on 2010/04/27 22:58:43 UTC

T5.1: Using templates to generate html email

I'd like to have my tapestry web-app generate emails on particular  
actions. I've seen various methods of using tapestry 3 & 4 to send an  
email, but have not found a good recipe for tapestry 5.

Is there a way (for example) to deliver a different markup writer to a  
page's component, which can then be dumped into an email?

--
Robert Hailey


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5.1: Using templates to generate html email

Posted by Josh Canfield <jo...@gmail.com>.
> Is there a way (for example) to deliver a different markup writer to a
> page's component, which can then be dumped into an email?

There isn't a supported/easy way to do this. I've had various hacks
work (replacing everything in the Environment for instance) in older
versions of Tapestry5, but they are fragile and inevitably had to be
rewritten on upgrade. I finally just went to generating a new HTTP
request for the page that holds the email contents. You can pass data
to the email page either via the session or through the activation
context.

Josh

On Tue, Apr 27, 2010 at 1:58 PM, Robert Hailey <ro...@cmediacorp.com> wrote:
>
> I'd like to have my tapestry web-app generate emails on particular actions.
> I've seen various methods of using tapestry 3 & 4 to send an email, but have
> not found a good recipe for tapestry 5.
>
> Is there a way (for example) to deliver a different markup writer to a
> page's component, which can then be dumped into an email?
>
> --
> Robert Hailey
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
--
http://www.bodylabgym.com - a private, by appointment only, one-on-one
health and fitness facility.
--
http://www.ectransition.com - Quality Electronic Cigarettes at a
reasonable price!
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5.1: Using templates to generate html email

Posted by Alex Kotchnev <ak...@gmail.com>.
The thing to note here is that the tapx-templating needs to run in a
completely separate tapestry app for generating the emails. Thus, if (like
me), you want to be able to send HTML email from your current tapestry5 app,
this doesn't work (at least not trivially).

I use the chenillekit-templating module with FreeMarker to generate HTML
emails within my T5 app .

Regards,

Alex K

On Wed, Apr 28, 2010 at 2:36 AM, Igor Drobiazko <ig...@gmail.com>wrote:

> Try tapx-templating
> http://tapestry.formos.com/projects/tapx/tapx-templating/
>
> An example can be found here:
>
> http://github.com/hlship/tapx/blob/master/tapx-templating/src/test/java/com/howardlewisship/tapx/templating/integration/SendMail.java
>
> On Tue, Apr 27, 2010 at 10:58 PM, Robert Hailey <robert@cmediacorp.com
> >wrote:
>
> >
> > I'd like to have my tapestry web-app generate emails on particular
> actions.
> > I've seen various methods of using tapestry 3 & 4 to send an email, but
> have
> > not found a good recipe for tapestry 5.
> >
> > Is there a way (for example) to deliver a different markup writer to a
> > page's component, which can then be dumped into an email?
> >
> > --
> > Robert Hailey
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Best regards,
>
> Igor Drobiazko
> http://tapestry5.de/blog
>

Re: T5.1: Using templates to generate html email

Posted by Igor Drobiazko <ig...@gmail.com>.
Try tapx-templating
http://tapestry.formos.com/projects/tapx/tapx-templating/

An example can be found here:
http://github.com/hlship/tapx/blob/master/tapx-templating/src/test/java/com/howardlewisship/tapx/templating/integration/SendMail.java

On Tue, Apr 27, 2010 at 10:58 PM, Robert Hailey <ro...@cmediacorp.com>wrote:

>
> I'd like to have my tapestry web-app generate emails on particular actions.
> I've seen various methods of using tapestry 3 & 4 to send an email, but have
> not found a good recipe for tapestry 5.
>
> Is there a way (for example) to deliver a different markup writer to a
> page's component, which can then be dumped into an email?
>
> --
> Robert Hailey
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Best regards,

Igor Drobiazko
http://tapestry5.de/blog