Setting Up FormMail

If you would like to set up a simple e-mail list or sign-up form for customers visiting your website to fill out, one of the simpler programs to use is a FormMail script. FormMail allows you to embed a form composed of several fields on your website. When a user fills in the fields and submits the form, the information is emailed to an address of your choice. FormMail is not a part of the HTML, it runs as its own program. However, FormMail can be customized with things like number of recipients, syntax check, and thank you pages from within the <form> </form> line of the HTML code.

While FormMail scripts are useful, they do have some drawbacks. One major drawback is that the form and the email address associated with it are open to spammers. However, Tectite (http://www.tectite.com/formmailpage.php), a brand of free FormMail script, will run submitted information through several filters and tests which can determine whether the information qualifies as spam. Tectite’s FormMail can be customized by editing the HTML code or by purchasing Tectite’s FormMail Configuration Wizard.

In this example we will simply edit the script and the HTML code. Editing these files should be done using a simple text editor. Web-based editors may alter the code and cause it not to work. An easy way to get started is to download Tectite FormMail (http://www.tectite.com/formmail.zip). In the formmail.php file included, add in your email at line 239 or 240 (depending on which version you receive):

$TARGET_EMAIL = array(EMAIL_NAME “@yourhost\.com$”);

For example, if your email is bob@testing.com, change the line to:

$TARGET_EMAIL = array(”bob@testing\.com$”);

Save, and open up sampleform.htm. Line 23 should look like this:

<form method=”post” action=”http://www.your-host-name.com/formmail.php” name=”SampleForm”>

If your domain is www.testing.com, change the line to this:

<form method=”post” action=”http://www.testing.com/formmail.php” name=”SampleForm”>

Next, change line 29 to include your email. Example:

<input type=”hidden” name=”recipients” value=”you@your-host-name.com” />

If your email is bob@testing.com, change the line to

<input type=”hidden” name=”recipients” value=”bob@testing.com” />

Upload both formmail.php and sampleform.htm to your domain directory. Open up sampleform.htm with a web browser (EX: www.testing.com/sampleform.htm) and test out the form. Here’s mine:

http://briansilhanek.com/contact-me/

All the options for a fully functional FormMail are contained within formmail.php. You can alter the fields, look, and even add security features by altering code within the file. A very helpful guide for enabling these options is available at:

http://www.tectite.com/terry_allen_guide/web-content/index.html

20
Oct
Written by Brian
Categories: Uncategorized

Leave a Reply