YarraNet

YarraNet CGI

The following generic CGI scripts are available for YarraNet customers to use. If you require a script that is not mentioned here then contact the YarraNet Webmaster.

  • FormMail - Using formmail you can have the results from a form on your web page emailed to your email address in an easy to read format.

FormMail

Using formmail you can have the results from a form on your web page emailed to your email address in an easy to read format.

To use the script for your own forms you need to have a form tag that looks like this:
<form action="http://www.yarranet.net.au/shell/generic/formail.pl" method="post">

You will also need to contact us and tell us the email address of the recipient so that we can add it to the list of allowed recipients.

A common way to use FormMail is to create your own 'Thank You' page that users will be redirected to after they have submitted the form. You would then put the form code below into your page.
<form action="http://www.yarranet.net.au/shell/generic/formail.pl" method="post">
<input type="hidden" name="recipient" value="your email address">
<input type="hidden" name="subject" value="The subject for the email">
<input type="hidden" name="redirect" value="http://www.yarranet.net.au/yoursite/thankyou.htm">

... your form fields ...

<input type="submit" name="submit">
</form>

If you want to configure the form a little more then you can use the fields shown below:

Form Fields
Field NameExplanation
Necessary Form Fields
recipient The email address that your form results will be mailed to.
<input type="hidden" name="recipient" value="youremail@yarranet.net.au">
You need to contact us and tell us the email address of the recipient so that we can add it to the list of allowed recipients.
You can use an alias so that spam bots can't harvest your email address. Let us know the alias and the address it should point to and we'll set it up.
e.g. alias: youralias email: youremail@yarranet.net.au The html will then be:
<input type="hidden" name="recipient" value="youralias">
Optional Form Fields
Field NameExplanation
subject The subject that you wish to appear in the e-mail. If you do not use this option, then the subject will be: WWW Form Submission
If you wish to choose what the subject is:
<input type="hidden" name="subject" value="Your Subject">
To allow the user to choose a subject:
<input type=text name="subject">
email Allows the user to specify the e-mail address in the From: field of the message you receive. If you require an email address with valid syntax, add this field name to the 'required' field.
<input type=text name="email">
realname The users real name that appears alongside the address in the from field.
<input type=text name="realname">
redirect The full URL for the page users are sent to instead of the default confirmation page.
<input type="hidden" name="redirect" value="http://www.yarranet.net.au/site/page.htm">
or
<input type="hidden" name="redirect" value="http://www.yourdomain.com/page.htm">
required A list of fields that MUST be filled in. Users will be informed if they are not.
<input type="hidden" name="required" value="email,phone">
env_report Specify a list of CGI environment variables that you would like to be placed in the email. Useful if you wish to know what browser they were using, what domain they were coming from or any other attributes associated with environment variables.
<input type="hidden" name="env_report" value="REMOTE_HOST,HTTP_USER_AGENT">
Some environment variables that might be useful:
REMOTE_HOST - Sends the hostname making the request.
REMOTE_ADDR - Sends the IP address of the remote host making the request.
HTTP_USER_AGENT - The browser the client is using to send the request.
sort The order in which you wish for your fields to appear in the e-mail, if different from the order on the page.
Alphabetically: <input type="hidden" name="sort" value="alphabetic">
A set field order: <input type="hidden" name="sort" value="order:name1,name2,etc...">
print_config The config fields from the email header that you want printed in the body of the message.
<input type="hidden" name="print_config" value="email,subject,etc...">
print_blank_fields Have all form fields are sent in the email, regardless of whether or not they were filled in.
<input type="hidden" name="print_blank_fields" value="1">
missing_fields_redirect The full URL for the page users are sent to instead of the default error page if there are fields listed in the required form field that are not filled in.
<input type="hidden" name="missing_fields_redirect" value="http://www.yarranet.net.au/site/error.html">
Form Fields to format the default 'thank you' page if you have not used the redirect Field
Field NameExplanation
title The title of the page that is shown after the user submits the form.
<input type="hidden" name="title" value="Your Title">
return_link_url The URL that will appear as return_link_title on the confirmation page.
<input type="hidden" name="return_link_url" value="http://www.yarranet.net.au/site/page.htm">
return_link_title The text that will be used for the link to the return_link_url.
<input type="hidden" name="return_link_title" value="Back to Main Page">
background The background image for the confirmation page.
<input type="hidden" name="background" value="http://www.yarranet.net.au/site/image.gif">
bgcolor The background color for the confirmation page. Use standard web RGB format.#rrggbb
<input type="hidden" name="bgcolor" value="#rrggbb">
text_color The text color for the confirmation page. Use standard web RGB format.#rrggbb
<input type="hidden" name="text_color" value="#rrggbb">
link_color The link color for the confirmation page. Use standard web RGB format.#rrggbb
<input type="hidden" name="link_color" value="#rrggbb">
vlink_color The visited link color for the confirmation page. Use standard web RGB format.#rrggbb
<input type="hidden" name="vlink_color" value="#rrggbb">
alink_color The active link color for the confirmation page. Use standard web RGB format.#rrggbb
<input type="hidden" name="alink_color" value="#rrggbb">

Full Documentation can be found at Matt's Script Archive.

Formail Copyright © 1995-1997 Matthew M. Wright

Back to top

Home | Hosted Sites | Web Design and Hosting | Internet Training and Online Learning
Become a Subscriber | User Tools and Downloads | About YarraNet | Contact Us
Page © YarraNet