Dave's Form Mail Script
with built-in Comment Form
Based on the Form-Mail perl script by Reuven M. Lerner (reuven@the-tech.mit.edu)
modified by Matt Wright
(mattw@worldwidemart.com) to Email to you any and all fields from a
submitted form. I modified it to include a default Comment/Request form if
you GET the script. If you POST to the script from any form, it Emails the
fields that appear on that form.
You can play with the [Test Script] to see what it does without actually emailing anything.
Look at or download my [Complete Script] here
(1/7/96).
Save this page for instructions.
Important Information:
- You may need to change the first line of the script to match the location of perl on your system.
- You also may need to end the filename with '.cgi', as is required on most systems to run it from the Web.
- The script can me renamed as desired. The default form automatically gets its own URL for the form ACTION.
- If you modify the script in DOS you may get a "file not found" or "EOF in file" error when you test it in UNIX. This is due to DOS using carriage returns which the UNIX shell does not like. See my script [dos2unix.pl]
for a script to strip the cr's.
Variables to Set in the Program:
- $mailprog = '/usr/lib/sendmail'; # - Path to mail program
- $recipient = 'user@your_net.com'; # - Your Email address
- $nickname = 'George'; # - Personal or company name
- $homepage = '/~user/index.html'; # - Partial or full URL
Necessary Fields in HTML Form:
- username = remote users email address for replies (required)
- realname = specifies the remote users real identity
- subject = specifies what you want the subject of your mail to be
- All variables will appear in the body of Email in the order that they appear on the form
If you have any questions or comments you can use the real Comment Form or email me at efflandt@xnet.com
This page accessed 14617 times since
1/1/99.