You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Joel Trunick <Jo...@SmartPrice.com> on 2003/08/22 16:21:33 UTC

Email Tapestry Page

How would I go about emailing a page in Tapestry? Is there a way to do this?

I'd want to have a submit/link, and then have Tapestry generate the same
page and then send it. I know how to send an html email, just wondered how
I could tell Tapestry to generate the page for me (how to I capture and 
trigger the rendering?).

Thanks,
Joel

RE: Email Tapestry Page

Posted by Adam Greene <ag...@romulin.com>.
I created a component to do that.  It's rough and quick, but here it is.
You simply surround the content you want rendered as an HTML email, set the
"to" field to a collection of strings, the from, and the subject, and when
the page renders it emails the HTML rather than displaying it.  Here is an
example component reference for the .page:

    <component id="mailException" type="MailBlock">
        <static-binding name="from">postmaster@xyz.com</static-binding>
        <static-binding name="smtp">mail.xyz.com</static-binding>
        <binding name="subject" expression='subject'/>
        <binding name="to" expression='{"someone@xyz.com"}'/>
    </component>

Howard, If you want, you can include it in Tapestry-contrib, let me know if
it needs any changes to conform.

-----Original Message-----
From: Joel Trunick [mailto:Joel@SmartPrice.com]
Sent: Friday, August 22, 2003 11:22 AM
To: 'Tapestry users'
Subject: Email Tapestry Page



How would I go about emailing a page in Tapestry? Is there a way to do this?

I'd want to have a submit/link, and then have Tapestry generate the same
page and then send it. I know how to send an html email, just wondered how
I could tell Tapestry to generate the page for me (how to I capture and
trigger the rendering?).

Thanks,
Joel