Zope: Form E-mail Tool

ECN has developed a tool for processing form data and sending e-mail to some list of e-mail addresses.

Using the ECN Form Processing Tool

First create a Persistent List object which contains the e-mail addresses the form should submit to. The ID of this object does not matter. Once it is created make a mental note of the path to the object, you will need it later. (Note: This Persistent List must be Viewable by anyone with the Anonymous role.)

Next, create an HTML form. This can be done by hand or by using an HTML editor such as Adobe GoLive or Macromedia DreamWeaver. The field names should be descriptive, when the form is processed underscores in the field names will be replaced with spaces and each word will be capitalized.

The form must contain a field named "to_list" and a field named "subject". These can be hidden fields. See the example below for more information.

  • to_list - this is the path to the Persistent List object you created above.
  • subject - the subject of the e-mail that is sent.

Optionally you can include a field named "redirect_url". Once the e-mail is sent the user will be redirected to the URL contained in this field. It should be a valid URL.


In the example below the Persistent List is created at: /ECN/EmailList this should be changed the location of your Persistent List.

<form action="/ECN/Ztools/email">
  <input type="hidden" name="to_list" value="/ECN/EmailList">
  <input type="hidden" name="subject" value="Meeting Scheduled">
  <input type="hidden" name="redirect_url" value="/ECN/thanksForSubmission">

  <h3>Meeting Information</h3>
  Date: <input type="text" name="Date"><br>
  Time: <input type="text" name="Time"><br>
  Speaker: <input type="text" name="Speaker"><br>
  Details: <textarea name="Details"></textarea><br>
  Who's Invited: 
    <select name="Whos_Invited">
  <input type="submit" value="Send Mail">

Why is the Persistent List Required?

ECN does not allow you put the "to" addresses as a hidden field in the form code for security reasons. This would allow anyone from any server to send mail through the tool. Requiring the Persistent List insures that the user has access to the Engineering Web Cluster.

Last modified: 2008/08/28 10:31:39.866000 GMT-4 by brian.r.brinegar.1
Created: 2007/10/25 12:44:24.646000 GMT-4 by brian.r.brinegar.1.



Type in a few keywords describing what information you are looking for in the text box below.

Admin Options: Edit this Document