#!/usr/local/bin/perl # +-------------------------------------------+ # |email.cgi -- Send email via a form | # | | # |Author : Ryan William Facer | # |Created On : Thursday April 30, 1998 | # |Completed On : Tuesday May 19, 1998 | # |Last Modified By : Ryan William Facer | # |Last Modified On : Tuesday May 19, 1998 | # |Update Count : 0 | # |E-Mail : cattails@cattails.ca | # +-------------------------------------------+ # ******************************* # We include the cgi-lib.cgi file # ******************************* do "cgi-lib.cgi" || die "Content-type: text/plain\n\nError loading cgi-lib\n"; # ************************************************* # Now we call the subroutine in cgi-lib.cgi to read # in the variables from the form and set them up as # key=value pairs in the array @in # ************************************************* &ReadParse; # ***************************************** # Now we open up the email file for writing # ***************************************** $mailprog = 'mail -s "Hansentek Web Page Form E-Mail" facer@interlog.com'; open(EMAIL,"|$mailprog"); # Open the mail program # ************************************ # Now we enter the text into the email # ************************************ print EMAIL "From: $in{'email'}\n"; print EMAIL "Here is an e-mail message from : $in{'realname'}\n"; print EMAIL "**********************************************\n"; print EMAIL "$in{'message'}\n"; print EMAIL "**********************************************\n"; # ****************************************** # Close EMAIL and hence send off the message # ****************************************** close EMAIL; # ***************************************** # Print out the beginning stuff to tell the # server that we're sending it an HTML file # ***************************************** print "Content-type: text/html\n\n"; # *************************************************** # Print out the HTML page to be seen after submission # *************************************************** print "\n"; print "Thank You\n"; print "\n\n"; print "
\n"; print "Thank You\n"; print "
\n"; print "\n"; print "
\n"; print "
\n\n"; print "

Thank you, $in{'realname'}, for taking the time to send an e-mail.

\n\n"; print "\n"; print "\n";