Fusion Source Technologies

 Knowledge CenterWeb Design ServicesWeb Hosting ServicesSupport CenterProgramming ServicesSoftware DownloadsVisual Effects StudioCompany Information

Support Center
Click Here for Fusion Source Home Page        |    Virus Warnings    |     Security & Hacking    |    New Browsers
  For Security purposes your unique IP address has been logged: 38.103.63.59
 
DirectorySupport
Directory
Support Home Page
Customer Service
Technical Support
Site Maintenance
Emergency Support
Technical Papers
Client Services
Network Status

 
Technical Paper
Using Forms - Mail1.cgi

 

What is mail1.cgi?

Mail1.cgi is a program that allows you to take data from an html form and send it in an email. This is very easy to use, and only requires a few simple html tags. It takes the output of any form and emails all the variable name/value pairs to the email destination(s) you choose. It then displays a default confirmation page to the user, or you can create your own. It can optionally require input for any fields to ensure that the user doesn't leave them blank.

 

Getting mail1.cgi

Mail1.cgi is the executable program, and it has been placed in your htdocs directory when your account was set up. You should not have to do anything further to get it to work. If you do not see mail1.cgi in your htdocs directory and/or want to have a copy of it in other directories, please contact us for assistance.

 

Sample form - sample.html

Sample.html is a demo form. It illustrates the use of the required "hidden fields" tags to customize mail1.cgi for your form.

Note: mail1.htm needs to be configured before it will work! You need to replace certain values such as "put-your-e-mail-address-here" with an actual email address!

To see the sample form in action, click here.

To view source code to get you started, click here.

 

Hidden Fields

Here is a sample of the hidden fields (note: all variable names are CASE SENSITIVE):

 



your html here...

*<form method=post action="http://www.yourdomain.com/mail1.cgi">

*<input type="hidden" name="to" value="put-your-e-mail-address-here">
*<input type="hidden" name="subject" value="Your Company Name here Information Request">
*<input type="hidden" name="nexthtm" value="/Welcome.html">
<input type="hidden" name="auto_nexthtm" value="EXISTS">
<input type="hidden" name="validate" value="name, phone, email">

**Name: <input name="name">
**Phone: <input name="phone">
**Email: <input name="email">

your html here...


  * Required tags.
** We just used these as an example. You can use whatever form types and field names you want.
 

The hidden fields have the following uses:

  • "to" - the email address the form data will be emailed to. It can be one email address or several addresses separated by commas.
  • "subject" - the subject line of the email that will be sent from the form
  • "nexthtm" - the web page the user will be sent to after the form is processed. (Usually this is a thank you page.) This will appear as a link
  • "auto_nexthtm" - this will cause the user to be sent directly to the page specified in "nexthtm" page without stopping at the default "form processed" page.
  • "validate" - if present, this list of variable names will be tested for any entry. If the user has not entered something in the respective variable, they will be prompted to do so. You can put as many variable names on this line as you want, separated by commas, but you cannot have any carriage returns in the line.

 

Troubleshooting Mail1.cgi

  1. Have you filled in all the necessary lines, and made sure you provided a valid email address?
  2. Did you pay attention to capitalization? If you put name="To" instead of name="to", it will not work.
  3. If you used the field "nexthtm", did you specify the correct path? For example, if your form is in the htdocs directory, but the thanks page is in the subdirectory "pages", make sure you put "pages/thanks.htm", not "thanks.htm"!
  4. If you used the validate function, did you make sure that the fields you're validating exist in your form? For instance, did you validate "lastname" instead of "last-name"? Also, capitalization is important. If the field name is "Comments", you can't validate for "comments".

If you still can't solve the problem or decipher the error message, contact Technical Support with a detailed description of the problem.


choose another technical paper

 

        
   Copyright ©2001 Fusion Source Technologies. All Rights Reserved. Privacy Statement  |  Legal Notices and Terms of Use   

 Support Services managed by the Support Response Team - last updated 11.10.2001 @ 04:28 PM -0500