My Account
Domain Registration Management Services
Web Services
Rates and Specs
Bulk Rates
CGI Library
Order Form
Tech Support
Billing Info
Company Info
Legal Info
Privacy Statement


Web Services

FormMail Gadget;

Return CGI Library

This gadget allows you to setup order forms, feed-back forms and the like. The data from the form is e-mailed to an account that you specify.

The first thing to do is build the form and 'point it' at the formmail program.

I've built a sample for this demo. This is the form. And here is what the HTML looks like . (It's just a simple computer order form. A more useful implementation would be to feed an 'instant' estimate back to a customer... but that isn't what this page is here to discuss :)

I will leave off a tutorial on forms to another time (or refer you to the Internet at large). We are interested in the following details:

The <form action=...>

This field specifies where the form values get sent by the browser. We set this as follows:

<form action="/cgi-bin/mail" method="post">

The recipient value:

The purpose of this script is to convert a form to e-mail, which means that we need to have an e-mail address to send the results to. We do that with a hidden field as follows:

<input name="recipient" type="hidden" value="yourid@yourdomain" />

Note: All mail sent through this gadget (which has been abused by spammers), will be queued and scanned by a human UNLESS you send it to an address at yourdomain. If you want it delivered to your ISP, please configure a forwarding address (see the VMAIL instructions).

Those are the only mandatory fields. The following predefined fields are optional, but add significantly to the value of the form. Any other fields that you define are automatically sent to you in the e-mail message.


We specify the subject of the mail message with a hidden field using a line like the following:

<input name="subject" type="hidden" value="formmail demo" />


This is another hidden field that is used to specify a URL that the client browser should go to after submitting the form. Usually this would be a thank you note of some type (silly example.) (Note that this has to be fully qualified, as the default directory is /cgi-bin during the redirect.)

<input name="redirect" type="hidden" value="/gadgets/formmail/thanks.html" />


We might give the client a field to enter their e-mail ID. This will be used as a return address for the message you get.

<input name="username" type="text" size="40" />


We might give the client a field to enter their real name (as compared to their e-mail id). This will also be used in the return address you received.

<input name="realname" type="text" size="40" />

Home Page    Domain Registration Services    Web Services    Technical Support
About Baremetal    Privacy Statement    Billing Info    Charities
My Account    Legal Info    Search BareMetal

Copyright 1996-2012, Inc.
Last updated: Thursday, 28-May-2015 16:14:50 PDT
Last Accessed from:
Questions and comments to