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:
|Name||Sender's name||Rex Swain|
|Sender's email firstname.lastname@example.org|
|To||Primary addressee(s)||Rex Swain <email@example.com>|
|Cc||Cc firstname.lastname@example.org, email@example.com|
|Bcc||Bcc list||John Doe <firstname.lastname@example.org>|
|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 email@example.com, Web http://www.rexswain.com