Support

CGI Email

In order to use Matt's Form Mailer, follow the directions. Matt's Form Mailer is a universal WWW form to E-mail gateway which is fairly easy to use if you follow the directions outlined.

Creating forms in HTML can get complicated so you should look at examples and tutorials on making forms if you are just beginning. Your form should always begin with the <FORM ACTION="whatever"> tag and end with the </FORM> tag. Below are some very good resources to help you learn how to build forms consisting of text fields, check boxes, radio buttons, text areas, and pull-down menus.

Mosaic Fill-out-Forms Tutorial
Another HTML Forms Tutorial



1.  Create your Form

Setup your form the way you want it on your website. Your must start with the following line below.


<FORM ACTION="/cgi-bin/FormMail.cgi">


Now you must use some special input fields within your form. For example, if you want to require that certain field
s are filled in to submit the form, redirect visitors to a different HTML page when the form is submitted, or use environmental variables when the form is submitted.

There is only one form field that you must have in your form, for FormMail to work correctly. Set it up using the directions below.


2.  Configure the Recipient Field: Required

To direct people who submit the form to a specific URL, just include the following line of code below in your form. It is best to put this line directly below your <FORM ACTION...> tag.

<input type="hidden" name="recipient" value="">
 

Field: Description:
recipient This form field allows you to specify to whom you wish for your form results to be mailed. Most likely you will want to configure this option as a hidden form field with a value equal to that of your e-mail address, which we have already done for you.

3.  E-Mail Subject: Optional

The subject field will allow you to specify the subject that you wish to appear in the e-mail that is sent to you after this form has been filled out. This field is optional and not required for your form mailer to work. If you wish to set your e-mail subject to something other than "WWWForm Submission" (the default), then copy the following HTML line below and paste it in your form.

<input type="hidden" name="subject" value="Your Subject">

Just be sure to set the subject on the e-mail to whatever you want. By default, e-mails sent by the form will have the subject "Your Subject".

Field: Description:
subject The subject field will allow you to specify the subject that you wish to appear in the e-mail that is sent to you after this form has been filled out. If you do not have this option turned on, then the script will default to a message subject: WWW Form Submission

 

4.  Return E-mail Address: Optional

This form field will allow the user to specify their return e-mail address. While this form field is option, if you want to be able to return e-mail to your user, we strongly suggest that you include this form field and allow them to fill it in. To include this form field, just copy the following HTML line below and paste it in your form.

<input type="text" name="email">

Now assuming that the person who fills out the form leaves their actual e-mail address, you will be able to respond directly to the results of their form since their e-mail address will be listed as the reply e-mail address.
 

Field: Description:
email This form field will allow the user to specify their return e-mail address. If you want to be able to return e-mail to your user, I strongly suggest that you include this form field and allow them to fill it in. This will be put into the From: field of the message you receive. If you want to require an email address with valid syntax, add this field name to the 'required' field.

 

5.  Realname: Optional

The realname form field will allow the user to input their real name. Just copy and paste the following line of HTML into your webpages to get the sender's name.

<input type="text" name="realname">

Field: Description:
realname The realname form field will allow the user to input their real name. This field is useful for identification purposes and will also be put into the From: line of your message header.

 

6.  Required Fields: Optional

You can now require for certain fields in your form to be filled in before the user can successfully submit the form. For example, lets say that we want to require the sender fill out his/her e-mail address and real name (as we have already covered these optional fields), then we would place the following line below in our form.

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

Notice that we are listing the name of the fields in which we want to be required to be filled out in order to submit the form. These names are listed under the value field of the required tag as shown above. If you had a form field named "telephone" that you wanted mandatory, then you would just list "telephone" as a value under the required field.
 

Field: Description:
required See the description and example give above.

 

7.  Redirect: Optional

To direct people who submit the form to a specific URL, just include the following line of code below in your form. It is best to put this line directly below your recieptant tag.

<input type="hidden" name="redirect" value="http://www.studiodeluxe.net/thanks.html">

Now when someone submits the form they will be directed to the URL listed in the value field above. Make sure you either rename this page from "thanks.html" to whatever you want or create a document named thanks.html. Also, make sure you path is correct if you are placing this thank you page in a different directory.

Field: Description:
redirect If you wish to redirect the user to a different URL, rather than having them see the default response to the fill-out form, you can use this hidden variable to send them to a pre-made HTML page.

8.  Finishing The Form

Now that you have chosen what options to use on your form (required fields, e-mail address, sender's name, redirect, e-mail subject) and you have specified a recipient for the e-mail the program sends, the last thing to do is make sure it all works!

The FormMail program will send the results of the form to the e-mail address in the order in which it is listed on the form. For example, if the first field asks for a name, then address, then telephone, then the e-mail will first list the sender's name, then their address, and their telephone number.

You can use any type of input fields, including text, text areas, checkboxes, radio buttons, pull-down menus, and scrolling menus. It is not required to name the fields you use for your form (unless you are using the required, real name, e-mail subject, recipient, or redirect option).



 

Home   Web Hosting   Web Design   Ecommerce   Support   Contact Us
Search   Site Map   Privacy   Acceptable Use   Terms & Conditions

Copyright © 2003 Studio Deluxe International. All rights reserved