ZISP Demon Logo
 

[ Email Form - Reference ]

The Email Form lets visitors to your page send you comments by email.

Data files used on your website:

  • /_zisp_/email.txt - text file containing your email address.

Template files used by this Dynamic Tool

  • mailer.html - displays a form for visitors to complete.
  • m_ack.html - acknowledges and thanks visitor for completing the form.

Options available:

  • HEADER - text to include at the start of the email message.
  • FOOTER - test to include at the end of the email message.
  • INFO - include additional debugging information about the visitor.
  • ID - have multiple independent email forms.

Email Form Setup

Use the following HTML hyperlink to link to your email form:

<A HREF="/zisp/mailer">Click here</A>

You also need to create a file in your "_zisp_" directory. This file should be called "email.txt" and should contain your email address. The Email Form Dynamic Tool uses this file to determine where it should send the contents of completed forms to.

You can create this file using a simple text editor like Notepad. Type your email address on the first line of the file, and don't type anything else. Save the file as "email.txt" and upload it to your "_zisp_" directory - your ISP's documentation will explain how to do this.

You Email Form Dynamic Tool is limited to only sending 30 email messages per hour, and will only send 5 email messages from the same visitor each hour. This makes it more difficult for an unscrupulous user to "mail-bomb" your account, overloading it with email messages.


Customising your Email Form using Templates

The Email Form Dynamic Tool uses two template files to generate the pages your visitors see.

If you haven't already done so, you might like to a quick look at the Templates Reference page in this documentation.

Template files should be stored on your website, in a folder called "easyzisp".

The mailer.html template

When a visitor clicks on your "/zisp/mailer" link they will see a page generated from the "mailer.html" template:

<h1>Email your comments</h1>

You can send a message to me using this
form:

<blockquote>
<form method=POST action="mailer">
  My name: <input type=text name=name size=30><br>
  My email: <input type=text name=email size=20><br>
  Subject: <input type=text name=subject size=20><br>
  <textarea rows=7 cols=48 name=comments>
I like your website because ...
  </textarea><br>
   <input type=submit>
</form>
</blockquote>
Thank you!
<p>
<a href="/">Click here</a> to return to my home page.

This template must contain a form with the following parameters:

<form method=POST action="mailer">

You can use whatever form elements you like in this form. The example above has three textboxes (named "name", "email" and "subject") and a textarea named "comments").

When a visitor presses the "Submit" button on the form, the Email Form Dynamic Tool will email the contents of the form to you at the address in the "email.txt" file mentioned earlier.

The mail message will contain lines looking like:

key: value

Each key is the name of a form element; the corresponding value is the value of the form element.

There are several special fields that you can use in the form. The field named are not case sensitive (i.e. "Subject" is the same as "subject" and "SUBJECT").

Subject

The field named "subject" is used to set the subject of the email which is sent.

Header

You can include a hidden "header" tag in your form. The value of this tag is a piece of text; this text is placed at the start of your email message. For example, you can insert the following HTML code into your form (i.e., somewhere between the "<form>" and "</form>" tags):

<input type=hidden name="header" value="Dear myself,
Someone entered the following data in your email form today:
">

Footer

You can include a hidden "footer" tag in your form. The value of this tag is a piece of text; this text is appended to the end of your email message. For example, you can insert the following HTML code into your form (i.e., somewhere between the "<form>" and "</form>" tags):

<input type=hidden name="footer" value="
From your friendly email form dynamic tool!">

Info

You can include a hidden "info" tag in your form. This tag can have any value you like, and it causes the Email Form Tool to include some additional information about the visitor who completed the form.

It tells you:

  • REMOTE IP ADDRESS and REMOTE HOST NAME:

    This information helps you identify the computer the visitor was accessing from

  • AUTHORIZED USER:

    If your website is password protected, this tells you the username the visitor used to access it. This value is usually empty.

    Contact your ISP for details on how to password-protect parts of your website.

  • WEB BROWSER:

    This tells you what sort of web browser the visitor was using.

For example, you can insert the following HTML code into your form (i.e., somewhere between the "<form>" and "</form>" tags):

<input type=hidden name="info" value="">

The m_ack.html template

When the visitor to your site completes your form, the Email Form Dynamic Tool generates an acknowledgement page from the "m_ack.html" template file.

<h1>Thank you</h1>

Thank you for your message. I will look at it when I
next read my email!
<p>
<a href="/">Click here</a> to return to my home page.


Using multiple Email Forms

You might want to have several email forms, to go to different email addresses. You can do this by giving each separate email form its own "ID".

<A HREF="/zisp/mailer?ID=NN">Click here</A>

... where "NN" is a number between 0 and 99.

For example, the email form with ID "45" will look for an email address in the file named "email45.txt" in your "_zisp_" directory. Remember, you must create this file manually before it can be used. It will try to use the templates named "mailer45.html" and "m_ack45.html" in your "easyzisp" directory, if they exist.


Potential problems with Email Forms

Mail Bombing

An unscrupulous user could use your email form to "mail-bomb" your email account. By submitting the form numerous times, or by writing a program to do so, they could cause hundreds of emails to be sent to your mail box.

For this reason, the Email Form Dynamic Tool restricts the number of emails it sends each hour. It will not send more than 30 emails in one hour, and it won't send more than 5 emails from the same person in one hour.

Mail Relays

When your ISP installed the Email Form Dynamic Tool, he or she needed to set up a mail relay. If you are sure you have configured your email form correctly, have given it the correct email address, and have waited for long enough for your test email messages to have been delivered (e.g. 24 hours) and you have not received any mail, contact your ISP.

Ask them to verify that the Zisp Email Form Dynamic Tool is correctly configured.