The HTML <FORM> below invokes a general-purpose Perl program (mailform.cgi) whose job is to send an e-mail message listing all the fields on the form which invoked it. The idea is to avoid having to write a new Perl program for every form you create.
mailform.cgi expects certain "key" fields in the form:
Field | Description | Example |
Name | Sender's name | Rex Swain |
Sender's email address | rex@rexswain.com | |
To | Primary addressee(s) | Rex Swain <rex@rexswain.com> |
Cc | Cc list | pollyr@snet.net, another@somewhere.com |
Bcc | Bcc list | John Doe <yet.another@somewhere.com> |
Subj | Subject text | Request For Proposal |
OkUrl | Next URL if OK | itworked.html |
Title | HTML <TITLE> for OK page | OK |
OkMsg | HTML for <BODY> of OK page | OK, message sent. |
All other fields are composed into the body of the message.
The only required key field is To.
Name and Email are used to generate "From" and "Reply-To" in the e-mail message.
If OkUrl is not specified, a confirmation page is generated on the fly using Title and OkMsg. (But then the user will probably have to click Back twice.) OkUrl is specified relative to the calling page. E.g., if "/dir/form.html" invokes mailform.cgi and OkUrl="ok.html", then the next page will be "/dir/ok.html".
You are visitor since 9 November 1996
Copyright © 1996-1998 Rex Swain
Email rex@rexswain.com,
Web www.rexswain.com