Loren, Take a look at the 'Printable Page' link at the bottom of every Zope.org page. Basically all it does is to replace the standard header/footer with one that allows nice printing. You could do the same except wrap the page in the sendmail stuff, and Robert is your father's brother. Shouldn't be too difficult to do. Phil ----- Original Message ----- From: "Loren Stafford" <lstafford@morphics.com> To: "'J. Atwood'" <jatwood@bwanazulia.com>; <zope@zope.org> Sent: Saturday, February 24, 2001 12:23 AM Subject: RE: [Zope] Help eMail this page to a friend
My code below already does a good job of "eMail source to a friend"; but I don't want to email source; I want Zope to process the source as a DTML document and mail the HTML that results.
-- Loren
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of J. Atwood Sent: Friday, February 23, 2001 16:03 To: Loren Stafford; zope@zope.org Subject: RE: [Zope] Help eMail this page to a friend
Easy..
Look at the code on Zope.org for view source. Just use the same type of thing. Include a button on the bottom of the page that reloads the page with /email_html method. This method could almost surround the html with sendmail tags.
That is just off the top of my head. Maybe there is a better way.
J
At 3:51 PM -0800 2/23/01, Loren Stafford wrote:
Thanks J,
...but that's not quite what I want to do. I want to email the current page (not its URL) as a MIME message, so that when you open the email (with an HTML-capable mail client) you see the page exactly as if you were viewing it with a web browser.
Therein is the problem: how to get Zope to render the DTML and make an HTML page.
-- Loren
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of J. Atwood Sent: Friday, February 23, 2001 15:26 To: Loren Stafford; zope@zope.org Subject: Re: [Zope] Help eMail this page to a friend
You might want to take a loo at this.. a little modification and it will work like a charm.
http://www.zope.org/Members/BwanaZulia/tell_a_friend
J
At 9:45 AM -0800 2/23/01, Loren Stafford wrote:
I'm trying to make a global method to implement the "eMail this page to a friend" function I've seen on many sites. (Surely someone has already done this for Zope, but I don't see How-To or email on the subject.) What I have so far is this:
<dtml-with "PARENTS[-1]"><dtml-sendmail mailhost=MailHost> To: <dtml-var eMailThisPageTo>@morphics.com Reply-to: <dtml-var "AUTHENTICATED_USER.getUserName()">@morphics.com From: webserver Subject: <dtml-var URL1> <dtml-mime type="text/html" encode="7bit"> <dtml-var "REQUEST.resolve_url(URL1)"> </dtml-mime> </dtml-sendmail></dtml-with "PARENTS[-1]">
But it just emails the text of the method that called it. E.g.
<dtml-var standard_html_header> <h2><dtml-var title_or_id></h2> <ul> <li><a href="http://helpdesk/">"Perfect Tracker" Help Desk</a> </ul> <dtml-var titlelist> <ul> <li><a href="http://search.support.microsoft.com/kb/c.asp?fr=0&SD=GN &LN=EN-US"
Microsoft Technical Support</a>. </ul> <dtml-var standard_html_footer>
How do I make it render (i.e. process the DTML in) the method that called it?
-- Thanks -- Loren
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )