SEARCH
Join Xtra Xtra Mail My Account Xtra Members Xtra Products Home
HOME  
QUICKSTART PLUS  
QUICKSTART  
ACCESS  
EMAIL  
DOMAIN NAMES  
WEB SITES  
WEB HOSTING  
Web Hosting Home
 
XtraHost
XtraHost Home
Pricing
Subscribe
Cancel
Online Documentation
Site Administration
Hosted Sites
 
SiteStarter
 
ADVERTISING  
XTRA DEALERS  
PRICING  
TERMS

Home Web Hosting XtraHost CGI Help

CGI Script Instructions


Form Mailer instructions
Counter instructions
Guestbook instructions

1. Form Mailer
Example Form Mailer - this can be copied and pasted directly into your HTML document

Form Mailer is a WWW form to email gateway, that will parse the results of the submitted web form and email them to a specified user. This script has many options that can be specified - instructions for each of the options available are as follows:

Step one Create an HTML page that contains the form to be mailed (eg. form.html)
Field recipient
Description This is a mandatory form field that allows you to specify the person to whom you wish your form results to be mailed to. You can configure this option as a hidden form field where the value is your e-mail address.

This field MUST be present in order for the formmailer to work

Note: you cannot have more than one email recepient.

Syntax recipient
Field subject
Description The email that is sent to you notifying you that your formmailer has been used, should have a Subject heading. To customize the email message "subject" field add one of the following:
Syntax If you wish to choose what the message subject is:

To allow the user to choose a subject:

If you don't configure this option, the subject heading will be the default title "WWW Form Submission"

Fieldemail
DescriptionThis value allows the form user to specify their return e-mail address.

This value will be put into the From field of the email message you receive, so that when you click on the Reply To button, the reply will be sent back to the formmailer user.

SyntaxIf responding to enquiries from your web site is essential, it strongly recommended that this field is included. You can force all form users to fill this in by adding to it the "required" field (see below).
Fieldrealname
DescriptionThe realname form field allows the user to input their real name. This field is useful for identification purposes and will also be put into the From line of the return email.
Syntax
Fieldredirect
DescriptionIf you wish to redirect the user to a different web page after they have finished filling out the form, you can use this hidden variable:
SyntaxTo set the web page they will end up at enter the URL:

To allow the user to specify the web page they wish to go to once the form is filled out:

Fieldrequired
DescriptionYou can require certain fields in your form to be filled in before the user can successfully submit the form. Simply place all the field names that you want to be mandatory into this field (separated by commas). If the required fields are not filled in, the user will be notified of what they need to fill in, and a link back to the form they just submitted will be provided.
SyntaxFor example, if you want to require that they fill in the email and phone field in your form, so that you can reach them once you have received the email, use a syntax like
Field env_report
Description Allows you to have Environment variables included in the email message you receive after a user has filled out your form. This is useful if you want to know what browser they were using, what domain they were coming from or any other attributes associated with environment variables that might be useful.

REMOTE_HOST - Sends the hostname and domain of the person making a request.
REMOTE_ADDR - Sends the IP address of the remote host making the request.
REMOTE_USER - If the server supports authentication and the script is protected, this will give the username they have authenticated as. Note: this not usually set.
HTTP_USER_AGENT - The browser the client is using to send the request

Syntax If you wanted to find the remote host and browser sending the request, you would put the following into your form.

Field sort
Description This field allows you to choose the order in which your variables appear in the email that the formmailer generates.

By default the fields are left in the order they appear in on the browser.

Syntax You can choose to have the field sorted alphabetically or you can specify a set order in which you want the fields to appear in your mail message.To sort alphabetically:

To sort by a set field order:

Field print_config
Description print_config allows you to specify which of the config variables you would like to have printed in the body of your return email. By default, no config fields are printed. This is because most of the form fields such as email, subject, real name, etc are included in the email header.
Syntax If you want to print fields in the body of your email:
Field print_blank_fields
Description print_blank_fields allows you to request that all the form fields are printed in the return HTML, regardless of whether or not they were filled in. The formmailer defaults to turning this function off, so that unused forms aren't emailed.
Syntax If you want to print all blank fields:

Field title
Description This allows you to specify the title and header that will appear on the Form Mail results page if you do not specify a redirect URL.
Syntax If you wanted a title of "Your Feedback Form Results":
Field return_link_url
Description This field allows you to specify a URL that will appear on the page that is returned after a form is submitted if a redirect page has not been setup.
Syntax

The return link will need a title so that it is visible on the web page. To add a title:

Field missing_fields_redirect
Description This form allows you to specify a URL that users will be redirected to if there are fields listed in the required form fields that are not filled in. This is so you can customize an error page instead of displaying the default.
Syntax

Step two Include a link to your Form
  On the HTML page that you want your link to the Form to appear, include the following tag:

Next - Adding a counter to your page
Next - Guestbook instructions


Example Form - this can be copied and pasted directly into your HTML





Next - Adding a counter to your page
Next - Guestbook instructions

In order to maximise your Internet presence, registering your company name as a domain name is an important step. Xtra Business can help you register your domain and host it for you. Then you can tell the world who you are and where to reach you! [more]



You've got some questions that need answering - right? Xtra is here to help - first consult our comprehensive Frequently Asked Questions. Or ring the Business Help Desk on 0800 BUSINESS.



Did you know that Xtra delivers over 6 million opportunities every month for advertisers to engage their audience? Increasingly, the Internet is the place where people are going to be informed and to purchase. Make sure you make your presence felt. [more]



©2000 Telecom New Zealand Limited. All rights reserved. Terms and Conditions.