Compulink Information eXchange,
1 Sundial Court, Tolworth Rise South,
Surbiton, Surrey, England. KT5 9RN

Sales +44 (0) 181 255 5050
Fax +44 (0) 181 255 5101

This page describes how to create the HTML code for form-to-mail processing using the script located at http://www.cix.co.uk/cgi-bin/formmailplus.pl. This is an enhanced replacement for the old formmail scripts.

HTML Forms Processing

The formmail script can be used as a universal WWW form -> Email gateway.

Sample HTML is located near the bottom of this page.

A Sample Form is located at the bottom of this page.

Field Definitions


Required Fields


recipient email address

<input type=hidden name="recipient" value="your@email.address">


Optional Fields


subject line of the message

<input type=text name="subject">

email address of the sender

<input type=text name="email">

realname of the sender

<input type=text name="realname">

redirect address for successfully submitted forms

<input type=hidden name="redirect" value="http://www.cix.co.uk/tutorials/formmailplus.passed.html">

required to be filled fields go in here

<input type=hidden name="required" value="email,subject">

missing_fields_redirect address for submitted forms with missing data

<input type=hidden name="missing_fields_redirect" value="http://go.here.if.some.fields.are.blank/file.html">

env_report specifies any of these three env's to include in the email

<input type=hidden name="env_report" value="REMOTE_HOST, REMOTE_ADDR, HTTP_USER_AGENT">

print_blank_fields in the email message

<input type=hidden name="print_blank_fields" value="1">

Sample HTML

<html><head><title>Sample formmail page</title></head>
<body><h1>Sample formmail page</h1>

<form action="http://www.cix.co.uk/cgi-bin/formmailplus.pl" method=post>

<input type=hidden name="recipient" value="webmaster@cix.co.uk">

<strong>Subject of your email</strong><br>
<input type=text name="subject">

<strong>Your email address</strong><br>
<input type=text name="email">

<strong>Your real name</strong><br>
<input type=text name="realname">

<input type=hidden name="redirect" value="http://go.here.when.done/file.html">

<input type=hidden name="required" value="email,subject,realname">

<input type=hidden name="missing_fields_redirect" value="http://go.here.if.some.fields.are.blank/file.html">

<input type=hidden name="env_report" value="REMOTE_HOST, REMOTE_ADDR, HTTP_USER_AGENT">

<input type=hidden name="print_blank_fields" value="1">

<H2>Feedback data</H2>

Are you male
<INPUT TYPE="radio" NAME="mailorfemale" VALUE="Male">
or female
<INPUT TYPE="radio" NAME="mailorfemale" VALUE="Female">
click here
<INPUT TYPE="radio" NAME="mailorfemale" VALUE="Erm?" CHECKED>
if you dont know.
<P>

Please enter any other comments here.<br>
<TEXTAREA NAME="Comments" ROWS=10 COLS=50></TEXTAREA><P>

<INPUT TYPE="submit" VALUE="Submit details for processing"><P>

</body></html>

Sample HTML

Please enter the Subject line for your email message.

What email address shall I use for replies?

And whats your real name?

Is this page easy to understand?

Please enter any other comments here.


Formail version 1.6 is Copyright © 1996-1997 Matt Wright mattw@worldwidemart.com
Created 06/09/95 (Last Modified 05/02/97)
Matt's Script Archive, Inc.: http://www.worldwidemart.com/scripts/


Copyright © 1997, Compulink Information eXchange Ltd.
<webmaster@cix.co.uk> <sales@cix.net.uk> <support@cix.co.uk>