#!/usr/local/bin/perl ################################################################ ################################################################ #### Constants & Definitions ################################################################ ################################################################ $DEBUG = 0; # Debug 0 = off $debugfile = "/tmp/debug.$$"; # Will be deleted when done $mailprog = '/usr/lib/sendmail'; # mail program on your system. $mailfile = '.' . $ENV{'PATH_INFO'} . '/email2'; # Set to the current root $indexfile = 'http://www.consite.com/techtron/index.htm'; ################################################################ #### Setup ################################################################ # Print out a content-type for HTTP/1.0 compatibility print "Content-type: text/html\n\n"; # Print a title and initial heading print "
"; $FORM{$name} = $value; #print "\$FORM{ ", $name," } to ", $FORM{$name },"
"; } ###################################### #### Check for Blank Required Fields # ###################################### &blank_phone_response unless ($FORM{'home_num'} || $FORM{'E-Mail'}); $FORM{'yname'} =~ s/ /_/g; ###################################### ### Now send mail to $recipient # ###################################### open (MAIL, "|$mailprog $recipient") || &mail_problems("Unable to send mail to '$recipient'."); ########################################################################## #### Print out the mail message - Auto Generated Code ################### ########################################################################## print MAIL "From: webuser\@consite.com\n"; print MAIL "Reply-to: $FORM{'E-Mail'}\n"; print MAIL "Subject: Quote Request Form\n"; print MAIL "\n\n"; print MAIL "Quote Request Form. \n\n"; ###################################################################### print MAIL "\nREQUESTOR INFORMATION\n"; ###################################################################### print MAIL " Your Name : $FORM{'yname'}\n"; print MAIL " Company Name : $FORM{'cname'}\n"; print MAIL " Home Address : $FORM{'add1'}\n"; print MAIL " City, State, Zip : $FORM{'city'} $FORM{'state'} $FORM{'zip'}\n"; print MAIL " Phone Number : $FORM{'phone_num'}\n"; print MAIL " E-mail : $FORM{'E-Mail'}\n"; ###################################################################### print MAIL "\nProject\n"; ###################################################################### print MAIL "$FORM{'project'}\n\n"; ###################################################################### print "Thank you very much for your Quote Request." ; print "Return to our home page, if you like.
"; #******************************************************************************** # subroutine blank_phone_response #******************************************************************************** sub blank_phone_response { print "
Return to our home page, if you like.<\P>"; print ""; exit; } sub mail_problems { $document_error = $_[0]; print "
Return to our home page.<\P>"; print ""; exit; }