Rex Swain's E-Mail Form

Last updated 18 August 1998
Deactivated 7 September 1998

Source Code

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:

FieldDescriptionExample
NameSender's nameRex Swain
EmailSender's email addressrex@rexswain.com
ToPrimary addressee(s)Rex Swain <rex@rexswain.com>
CcCc listpollyr@snet.net, another@somewhere.com
BccBcc listJohn Doe <yet.another@somewhere.com>
SubjSubject textRequest For Proposal
OkUrlNext URL if OKitworked.html
TitleHTML <TITLE> for OK pageOK
OkMsgHTML for <BODY> of OK pageOK, 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".

Sample Form:

Name:
Email:
To: (your e-mail address)
Cc:
Bcc:
Subj:
Title:
OkMsg:

Text:
TextArea:
YesNo: Yes   No
Select:
 
 
 
Note: Effective 7 Sep 1998,
the "Send E-Mail" button does not actually do anything
(and execute permission removed from mailform.cgi)

Other Summaries and Demos


You are visitor [Odometer] since 9 November 1996

Copyright © 1996-1998 Rex Swain
Email rex@rexswain.com, Web www.rexswain.com