SnowCrest Inc., P.O. Box 1379, Mt Shasta, CA 96067   (530) 926-6888 or (530) 245-4698



Instructions for setting up the Formmail.pl script

The easiest way to set up this script on your website is to copy the code below in the box titled "Example HTML". Alternatively, you may also just incorporate this script into a current form that you may have on your website. To do this only requires changing a few lines in the header of your form.

Note for SnowCrest Customers hosting their domains with SnowCrest.(Example: www.yourcompany.com) - SnowCrest users that host their domain with SnowCrest must call or email the Web Design department and have their domain name added to the list of allowed domains for this script. This script will not work otherwise!

This is an example of how to use the Formmail.pl script on your website (the highlighted HTML is required):

Example HTML:

<form method="post" action="http://www.snowcrest.net/cgi-bin/formmail.pl" />
<input type="hidden" name="recipient" value="account-name@snowcrest.net" />

<input type="hidden" name="required" value="realname" />
<input type="hidden" name="redirect" value="http://www.mydomain.com/thankyou.html" />

<!-- The value in the "value" field is the URL that the script redirects to, after submitting this form -->

<table border="0" align="center">
     <tr>
          <td>Name:</td>
          <td><input name="realname" size="40" /></td>
     </tr>
     <tr>
          <td>Company:</td>
          <td><input name="Company" size="40" /></td>
     </tr>
     <tr>
          <td> </td>
          <td><input type="submit" value=" Send Message "name="submit" /></td>
     </tr>
</table>
</form>

End Example (The example above is a form with only two fields and a submit button.)

For information on what these fields mean, use the chart below.

<form method="post" action="http://www.snowcrest.net/cgi-bin/formmail.pl">

This is required and is the line that calls the CGI script.

<input type="hidden" name="recipient" value="account-name@snowcrest.net" />

This is also required. Account_name@snowcrest.net needs to be your email address.

<input type="hidden" name="required" value="realname" />

This is a hidden field used to tell the form to require certain information. The "value" in the tag needs to be set to the name of one of your form fields. In this case, it is set to "realname" where in the Example HTML form code above, you will see that the first form field is called "realname". In this case, if the user does not fill out that field, the form will generate an error saying that that field was not filled out properly and the form will NOT submit until that field is filled out. To have more than one field be "required", you just need to name the form fields in that line such as the example below:

<input type="hidden" name="required" value="realname, email, phone, address" />

Of course, you will need to have form fields named realname, email, phone, address in order for this to work without generating an error report.

<input type="hidden" name="redirect" value="http://www.mydomain.com/thankyou.html" />

This field is NOT required but can be used. All that is needed is a url for the value here. The URL should be a web page saying something like "Thank you for filling out our form" or it can simply take the user back to your homepage. If you want to have a re-direct, the line should look like this:

<input type="hidden" name="redirect" value="http://www.mywebsite.com" />

<input type="submit" value=" Send Message "name="submit" />

This is required and submits the contents of the form in email format to the address specified above.

</form>

This is required and closes the CGI script.

SnowCrest.net is © 1995-2018 SnowCrest Inc., all rights reserved. Please do not duplicate or copy any graphics, layout or code on this website. Do you have a question or comment for us? Contact us. View our terms and conditions, privacy policy, and customer contracts. Usage of SnowCrest services constitues agreement to SnowCrest's terms and conditions. Read the Important Information Regarding California Relay Service and the Additional Information Regarding California Relay Service. This site has been validated for XHTML 1.0 Transitional and CSS 2.0.