If you just want a simple way to have a user's comments emailed to you, follow these simple steps:
1. Copy the source of the files below to your own Web data directory (where you keep the rest of your HTML files). You will only need to have the three Only Email files. If you want to also keep a text log file (perhaps for a record) of all email sent to you, please download the six Email and Text files.
|
Copy these 3 files for Only Email |
Copy these 6 files for Email and Text |
|
|
|
|
|
feedbacklog.html |
|
|
count |
NOTE: If you are having problems with copying the files.
(E.g. You click on the file and it brings up a page instead of copying it.)
You may do one of the following:
(1) Right click on the file and select Save Target As...
(2) Open the file (by clicking) then On your browser click File then Save As...
2. Edit your copy of the "yourform.html" file, in particular the values of these hidden fields:
a. _comment_dir should point to the directory containing "yourform.html," e.g., /webinfo/1/deptname or,
if you're using your home directory, use /home/nn/username/public_html where "nn" is the home filesystem number. You can find this out by doing a "cd" followed by a "pwd" which will print out your current directory, e.g., "/home/35/username"
b. _errorsto should be changed to your email address
c. _pipeline -- change the email address (after mailformat.txt) to your own email address
3. Edit your copy of the "mailformat.txt" file, in particular the values of the fields pertaining to your email address.
4. Make the files readable to the outside world. Do this by typing: chmod o+r filename where filename is the name of the file. ALSO, if you have the files "count" and "feedbacklog.html", they need to be writeable. Do this by typing: chmod o+w feedbacklog.html count
5. At this point, you may test out the form by bringing up "yourform.html" in your browser. Once you are comfortable with how it works, you may add more fields and modify the other two files to meet your needs.
a. Edit the "mailformat.txt" to show the returned Emailed contents. Note that in place of where you want the contents of a Web form's field, you need to put a '$" followed by the field name.
b. Edit the "showformat.html" document to reflect what you want to say to the user after the form's submission. You may choose to thank them, and offer links to your homepage or some other location.
c. Your messages are automatically saved to a file, feedbacklog. To change the format, edit appendformat.html.
See Hoagland's Error and FAQ html for further help.
See http://seclab.cs.ucdavis.edu/~hoagland/hfpm/ for full details on the program.