Difference between revisions of "Forms"
(Created page with 'This document demonstrates the use of the FormMail.pl CGI script. Please note that while we're unable to provide detailed support for this script (for reasons such as bugs, compa…') |
|||
Line 38: | Line 38: | ||
For information on what all the names and fields do, please see the README file inside the FormMail .zip file. | For information on what all the names and fields do, please see the README file inside the FormMail .zip file. | ||
+ | |||
+ | [[Category:Webhosting]] |
Revision as of 11:52, 18 May 2010
This document demonstrates the use of the FormMail.pl CGI script. Please note that while we're unable to provide detailed support for this script (for reasons such as bugs, compatibility issues, potential vulnerabilities, etc), we are able to provide this basic tutorial on setup for HTML forms on your Hurricane Electric hosted site. If you have any questions regarding the script itself, please see the NMS Support Page.
Ingredients
* The script.
You can download the NMS FormMail script from the NMS download page. Be sure to grab the 'compat' version.
Prior to putting the script on your site, you'll need to configure it. Configuration is fairly simple, as it takes place entirely in the second 'page' of the script.
Once you've downloaded the .zip file from the above link, open it up, then open FormMail.pl inside of your favorite text editor (we recommend 'notepad.exe' in Windows). Scroll down until you see the following:
BEGIN { $DEBUGGING = 1;
This is the beginning of the section you'll be editting. Here, you will edit the following lines:
$max_recipients = 1; $mailprog = '/usr/sbin/sendmail -oi -t'; $postmaster = 'you@example.com'; @referers = qw(example.com www.example.com); @allow_mail_to = qw(you@example.com);
$style = ;
You'll need to replace 'you@example.com' with your email address, and 'www.example.com' with your Hurricane Electric hosted website. The small change in '$mailprog' is important, so make sure you don't skip over it. * The form.
This is your standard HTML form with an ACTION which invokes the FormMail.pl CGI script.
Differences from cgiemail
Many of our long time customers will remember cgiemail, and wonder where it has gone. It's still exists for our legacy users, but we're recommending away from cgiemail, as it hasn't been supported for a very long time, and vulnerabilities do exist.
Required form entries are now designated inside a small array, as listed in the 'form.txt' link above.
'From' addresses no long require lengthy procmail recipies! You can now simply use 'email' and 'realname' in the form, and the script will take care of the rest.
For information on what all the names and fields do, please see the README file inside the FormMail .zip file.