Account Manager
 

FormMail Setup

FormMail is a very popular method of e-mailing the contents of a form to a user. It is relatively easy to set up and does its job well. Unfortunately, FormMail has numerous exploits which have come into being. Spammers have found security holes in previous versions and this allows them to send mail through whatever server host the account. Since we have a very strict anti-spam policy, we cannot allow our users to use their own FormMail scripts. We ask that you use the server-wide FormMail script. This way, if there are any exploits found on this version of FormMail, you will not be held accountable. We periodically check the servers for insecure FormMail scripts. If you have a need for a customized FormMail script and you have one available, please e-mail , so that we may insure that your FormMail version does not contain any exploits.

One drawback of using the server-wide FormMail script, is that you must send the contents of the form to an address that is on your domain name.

All that is needed to setup FormMail, is to create a form. Below is an example of a simple form:

<form name="test" action="/cgi-sys/formmail.pl" method="post"> <input type="hidden" name="recipient" value="sales@yourdomain.com">
Enter your name: <input type="text" name="name">
<input type="submit"> </form>

The only requirements for FormMail to work properly is the action="/cgi-sys/formmail.pl" and <input type="hidden" name="recipient" value="sales@yourdomain.com">. (Where sales@yourdomain.com is an e-mail address you have set up on your domain.)

Another example of FormMail, which utilizes a few more special features is shown below:

<form name="test" action="/cgi-sys/formmail.pl" method="post">
<input type="hidden" name="recipient" value="sales@yourdomain.com">
<input type="hidden" name="subject" value="This is a test form">
<input type="hidden" name="redirect" value="http://www.yourdomain.com/thankyou.htm">
<input type="hidden" name="required" value="e-mail,realname">

E-mail Address: <input type="text" name="email">
Name: <input type="text" name="realname">
Favorite Color: <input type="text" name="color">
<input type="submit">
</form>

In this example, you will notice the same action="/cgi-sys/formmail.pl" and <input type="hidden" name="recipient" value="sales@yourdomain.com">. Other input type="hidden" types are are listed below:

  • subject -- This defines what you want the subject of the e-mail to be.
  • redirect -- This defines what page you want the visitor to be taken. You will need to specify the full URL.
  • required -- This parameter takes on a list of the required fields that must be filled out in order for the form to be processed.
  • email -- This is considered a special parameter. It is really the reply-to address.
  • realname -- This will appear along with the email parameter. Instead of the mail appearing to come from just the e-mail address, the name will appear, also, allowing for a more personalized touch when replying.

These are not required to have a functioning form. The only requirements are that action="/cgi-sys/formmail.pl" is in your "form" tag and <input type="hidden" name="recipient" value="sales@yourdomain.com"> is listed below the opening "form" tag.

For more information about setting up FormMail please check this knowledgebase and our tutorials.



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read

Powered by WHMCompleteSolution