Domain Name Registration

www.

AIT Press®

     → Latest Articles, Interviews and Press Releases
US Based Tech Support | Local: 1-910-321-1200 | Sales: 1-800-878-4084 | Support: 1-877-209-5184

Products & Services


 
INC500 webhosting search award Eco-Friendly Web Hosting awards Certified Microsoft Partner Buy Veteran AIT Website Award Nominate Your Site

AIT Facebook AIT Twitter
Viewing: Help Desk > Script Library > Form Mail (fmail.pl)

Perl Form Mail (fmail)


AIT's Linux servers are all configured with this feature. Simply add the following 4 lines to your form to activate this feature.

<form action="/cgi-bin/fmail.pl" method="POST">
<input type="hidden" name="recipient" value="email address/alias on your server">
<input type="hidden" name="subject" value="Name of form-Order Form">
<input type="hidden" name="thankurl" value="http://www.yourdomainname.com/thankyou.htm">

A web site wouldn't be complete without some simple method of sending comments or requesting information. A small form and simple CGI can be designed to facilitate such a task. The comments form and CGI source are presented in two sections below.



HTML Source for the Comments Form

The HTML source below represents a simple comments form. This form can be customized for your Virtual Server by simply changing the occurrences of the email address to the address that you would like to use in the form. This address must be a mailbox or an alias on your server. It may be necessary to add an e-mail alias or e-mail mailbox if you use an e-mail address that does not currently exist on your Virtual Server.

<html>
<head>
<title>Send Comments / Request Information</title>
</head>
<body>
<h3>Send Comments / Request Information</h3>
<hr>
<p>
Feel free to send us your comments, suggestions, and/or questions.
We value your input and desire to make these pages as useful as possible.
Please leave an E-mail address so we can reply to you.
</p>

<p>
If your web client supports the "mailto" URL, you can use your
<A HREF="mailto:email-address@your-domain.name.">local mail app</a>
to compose and send a mail message. Otherwise, you can use
the form below.
</p>

<p>
For those using browsers that do not support forms such as this,
send mail to: <i>email-address@your-domain.name</i>
</p>
<hr>

<form action="/cgi-bin/fmail.pl" method="POST">
<input type="hidden" name="recipient" value="email address/alias on your server">
<input type="hidden" name="subject" value="Name of Form">
<input type="hidden" name="thankurl" value="http://www.yourdomain/thankyou.htm">
<p>
<font size="+1">Your Full Name:<</font><br>
<input name="name" size=50>
</p>

<p>
<font size="+1">Your E-mail address:</font><br>
<input name="username" size=50>
</p>

<p>
<font size="+1">The Subject of Your Message:</font><br>
<input name="subject" size=50>
</p>

<p>
<font size="+1">Your comments, suggestions, and/or questions:</font><br>
<textarea wrap=physical name="comments" rows=8 cols=50></textarea>
</p>

<p>
<input type="submit" value="Send comments">
<input type="reset" value="Clear">
</p>

</form>
<hr>
</body>
</html>

The form shown above represents the minimum amount of information that a comments form should contain- namely "recipient, name, email, subject, and comments". Other information can be added to the form above.... this information will also be sent to the "recipient" specified.

If you are unfamiliar with the FORM HTML element, or would like to learn more about forms, the following URLs are excellent resources:

Customer Service Library

http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/Docs/fill-out-forms/overview.html

Working Example of fmail.pl

AIT's Linux servers are pre-configured with the fmail.pl CGI script. However, you can download fmail.pl here and upload it to your cgi-bin directory on your Linux virtual server.

Feel free to send us your comments, suggestions, and/or questions. We value your input and desire to make these pages as useful as possible. Please leave an E-mail address so we can reply to you.

Your Full Name *:
Your E-mail address *:
The Subject of Your Message *:
Your comments, suggestions, and/or questions:
  

Copyright © AIT, Inc. 2005-2011 / Policies / Facebook Twitter