#!/usr/bin/perl # mailform.pl -- Read the contents of a form and mail it to the email # address set in the variable $email. To use, the HTML FORM ACTION tag # should contain the URL of this program. For instance: # #
# # If the user fills out the form as follows: # # Name: Matt Mahoney # Email address: matmahoney@aol.com # Check here: X # [Press here] # # Then the following line of input is sent to this program # # myname=Matt+Mahoney&email=matmahoney%40aol.com&ischecked=on # # This is translated into a more readable format by breaking into # lines on the "&", replacing "+" with space, and "%NN" (%00 through # %FF) with hexadecimal character NN, like this: # # myname=Matt Mahoney # email=matmahoney@aol.com # ischecked=on # # The program then mails this data to email@hostname.com and prints # an HTML confirmation to the user. The confirmation shows the # data and the address to which it was sent. # Get email address $email="mmahoney@cs.fit.edu"; # Get input from form, save in $_ $_=
$_
Return to main menu ";