mailform.cgi v1.4



Name : mailform.cgi
Version : 1.4
Last Modified : 08/28/96
Author : Todd Kuebler (kuebler@scn.org)

mailform.cgi is a generic cgi mail script written in Perl that hopefully can't be exploited easily. It takes the output from a form and will send the defined user(s) an email message with a list of key = value pairs. It will then send the requester back the defined url.

The following are the variables that you should set in the form that calls the script:


 mailformFromEmail - the full email address of who the email is from.
                     Default = someone@somewhere.com
 mailformFromName  - the name of the person the email is 'supposedly' from.
                     Default = Someone
 mailformToEmail   - the full email address of who the email is to.  Must
                     be of the form user@some.domain (a-zA-Z0-9_ are allowed)
                     No default.  This field is REQUIRED.   
 mailformToName    - the name of the person the email is to.
                     No default.
 mailformSubject   - the subject of the email to be sent.
                     Default = mailform results  
 mailformCc        - the address to send a cc to.
 mailformBcc       - the address to send a blind cc to.
 mailformURL       - the url to be returned to the browser.
                     Default = HTTP_REFERER


Below is an example of how to use mailform.cgi. The only required input is 'mailformToEmail'. All others have defaults. Only the form part is shown below, you will have to actually write a html document that includes lines like the following.
<FORM ACTION="/cgi-bin/mailform.cgi" METHOD="POST">

<INPUT TYPE="hidden" NAME="mailformToEmail" VALUE="todd@wolfe.net">
<INPUT TYPE="hidden" NAME="mailformToName" VALUE="Todd Kuebler">
<INPUT TYPE="hidden" NAME="mailformSubject" VALUE="Test">
<INPUT TYPE="hidden" NAME="mailformURL" VALUE="http://www.wolfenet.com/">

Your email address: <INPUT TYPE="text" NAME="mailformFromEmail" VALUE="someone@somewhere.com">
Your Name :<INPUT TYPE="text" NAME="mailformFromName" VALUE="Some One">

 A simple text field: <INPUT TYPE="text" NAME="foo" VALUE="Whatever default you want" SIZE="50">
 Another text field: <INPUT TYPE="text" NAME="bar">

<INPUT TYPE="submit">
</FORM>

This is what the above HTML would generate........
Your email address:
Your Name :
A simple text field:
Another text field:

webmaster@wolfe.net
Make your own free website on Tripod.com