User Login
About Us
Services
Spam Filtering
Location
Hours
Staff
Prices
Sample Bill
Policies
Wireless INternet
Network Settings
FAQ
Troubleshooting
Qmail Manual
Mutt Manual
CGI Scripts
Web Page Help
Users's Homepages
Businesses
Virtual Domains

Miscellaneous General Info Technical Support Hosted Sites

FormMail  - CGI Scripts

  FormMail is a form to email gateway. You can use it to email the results of a form on your web page. Just add a few magic fields [optionally hidden] in your form to supply parameters such as who to email it to, the subject, the sender's name and email address, etc. All other fields will be sent in the body of the email. You can use this a couple different ways. For an online order form, you would want the email address always to go to you, and probably the subject hidden so they can't change it. For a comment form, you might not want the subject field hidden. You could even allow the user to input the email address to send it to in some situations.

To use FormMail in your page, insert the magic fields into your existing form like this:

<FORM ACTION="/cgi-bin/formmail.pl" METHOD=post>
<INPUT TYPE=HIDDEN NAME="recipient" VALUE="you@cyberis.net">
<INPUT TYPE=HIDDEN NAME="subject" VALUE="Results of my submit-form">
<INPUT TYPE=HIDDEN NAME="redirect" VALUE="http://www.yoursite.com/success.html">
Your Name: <INPUT TYPE=TEXT NAME="realname">
Your e-mail address: <INPUT TYPE=TEXT NAME="email">
<br>
My data: <input type=text name="generic" value="add all the other fields you need">
</FORM>
<INPUT TYPE=SUBMIT>


Your Name: Your e-mail address:
My data:

If you were to fill in the resulting form and click submit, at email would go to you@cyberis.net (a ficticious user in this example). The email would say from [whatever you filled in], to you, etc. In the body of the message would be, in this case, [generic=whatever you typed in that field], and the names and values of any other fields you added. Finally, a new web page would pull up which you might use to indicate to the user that their form had been successfully submitted. If you omit the redirect field, a summary of your submission will be displayed instead. All magic fields are optional except recipient, however it is usually desirable to include all of the magic fields in the above example. Note that the subject or recipient fields could be made text instead of hidden, depending on your purpose.

Try it out if you want to find out exactly what the email looks like that gets sent to you.

For a complete description of FormMail including additional magic fields (such as require, see Matt Wright's script archives FormMail readme.

 
 
GoURL
Clock/Count
FormMail