[Zope] Re: [ZOPE Collector] Zope Question entry: Generating a feedback form

Tres Seaver tseaver@palladion.com
Mon, 07 Feb 2000 17:17:42 -0600


Chris McDonough <chrism@digicool.com> wrote:
> 
> I'm forwarding this to the zope mailing list in hopes someone can lend a
> hand....
> 
> You may want to subscribe... see http://www.zope.org/Resources and look
> for the mailing list link... (the site's not doing so well right now,
> try in a maybe an hour or so :( )
> 
> Your globopolis site is pretty cool!
> 
> herder@globopolis.com wrote:
> >
> > A new bug entry was added with the following information:
> >
> > Title:  Generating a feedback form
> >
> > At: http://classic.zope.org:8080/Collector/Collector/1040/sview
> >
> > Submitter:  Anne Cunningham
> >
> > Email:  herder@globopolis.com
> >
> > Description:  We are test driving zope by constructing our Globopolis intranet with it. One of the intranet's primary functions will be a bulletin board, and I have tried programming a mailto form three different ways using tutorials. It has yet to work. My most recent attempt involved creating a mail host and the feedback/sendfeedback documents. However, upon submission I get an SMTP error saying that the domain must be specified. I have checked with the tech guys here and maybe they're high on smack, but I believe the host and mail addresses are correct. I have just about given up on successfully implementing any forms using zope, please throw me an innertube..
> 
> --
> Chris McDonough - Digital Creations, Inc.
> Publishers of Zope - http://www.zope.org

Here is the code I use to mail out the ZGotW stuff:

-------------------- snip ---------------------------------
<dtml-var standard_html_header>

<dtml-let issueID=id
          issueURL=absolute_url
          issueTitle=title>
<dtml-sendmail mailhost=MailHost>
From: Zope Guru of the Week <ZGotW@palladion.com>
To: <dtml-var "_.string.join( toAddressList, ',' )">
Cc: <dtml-var "_.string.join( ccAddressList, ',' )">
Subject: [ZGotW] Issue #<dtml-var issueID> (<dtml-var status>)
Date: <dtml-var "ZopeTime().rfc822()">

<dtml-var "issue_txt( _.None, _, issueURL=issueURL )">

</dtml-sendmail>
</dtml-let>

<dtml-var standard_html_footer>
-------------------- snip ---------------------------------

A couple of points:

 * The header lines in the message body *have* to be flush against the
   margin -- no whitespace allowed!  This is the easiest error to make
   with the sendmail tag.

 * You *must* put one empty line between the headers and the body of
   the message.

 * The sendmail tag pushes a namespace on top of the stack which mucks up
   the id/title/absolute_url that you "expect" to be using -- hence the
   aliasing of them through a <dtml-let>

 * The MailHost object needs *both* the 'local host' and the 'SMTP host'
   properties filled in in order to function properly.  Fully-qualified
   domain names are best, although I have gotten it to work with short
   forms.

Hope this helps!
-- 
=========================================================
Tres Seaver         tseaver@palladion.com    713-523-6582
Palladion Software  http://www.palladion.com