Zope: Form E-mail Tool

Purdue IT has developed a tool for processing form data and sending an email to a list of email addresses.

Using the Engineering Form Processing Tool

First, create a Persistent List object that 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.

Example

In the example below, the Persistent List is created at: /ECN/EmailList. This should change 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">
       <option>Everyone</option>
       <option>Staff</option>
       <option>Students</option>
    </select><br>
  <input type="submit" value="Send Mail">
</form>

Why is the Persistent List Required?

Purdue IT 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 ensures that the user has access to the Engineering Web Cluster.

Print Article

Related Services / Offerings (1)

Submit a General Support request using the "Purdue IT Request" button to the right. The Purdue IT Service Desk will examine, follow-up and route as needed.