#!/usr/local/bin/perl # November 30, 1999 --- R. Chew --- POP # Revised April, 2000 --- S. Emery ---- POP # This perl script handles the form at submit.htm # for MRI Package sites on the Hiway server. # Scalar variables: # This should be set to the username or alias that # we want to recieve the form submission. $mailprog = '/usr/lib/sendmail'; $recipient = 'scott@popinteractive.com'; #$recipient = 'info@officename.com'; #******* Modify path to confirmation page as needed ******* $confirmation = "../resume/submit_ack.htm"; # Get the input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); # Split the name-value pairs @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $FORM{$name} = $value; } #Mail the responses from submit form open (MAIL, "|$mailprog $recipient") || die "Can't open $mailprog!\n"; print MAIL "From: $FORM{'email'}\n"; print MAIL "Reply-to: $FORM{'email'}\n"; print MAIL "Subject: Resume Submission\n\n"; #Auto Respond to user via email $user_address = $FORM{'email'}; open (AUTORESPOND, "|$mailprog $user_address") || die "Can't open $mailprog!\n"; print AUTORESPOND "From: $FORM{'email'}\n"; print AUTORESPOND "Reply-to: $FORM{'email'}\n"; print AUTORESPOND "Subject: Resume Submission\n\n"; print AUTORESPOND "Thank you for taking the time to submit your qualifications and resume. If your background and experience are not a match for immediate assignments, we will keep your information in our system and will contact you when we have an appropriate opportunity.\n"; close (AUTORESPOND); #Part 1: How To Contact You print MAIL "Email: $FORM{'email'}\n"; print MAIL "Name: $FORM{'name'}\n"; print MAIL "Address1: $FORM{'address1'}\n"; print MAIL "Address2: $FORM{'address2'}\n"; print MAIL "City: $FORM{'city'}\n"; print MAIL "State: $FORM{'state'}\n"; print MAIL "Zip: $FORM{'zip'}\n"; print MAIL "Business Phone: $FORM{'phone_bus'}\n"; print MAIL "Business Extension: $FORM{'phone_ext'}\n"; print MAIL "Home Phone: $FORM{'phone_home'}\n"; print MAIL "Other Phone: $FORM{'phone_other'}\n"; print MAIL "Other Phone Type: $FORM{'phone_pager_cell'}\n\n"; #Part 2: What You've Done & What You Want To Do print MAIL "Current Employment Status: $FORM{'status'}\n"; print MAIL "Highest Education Level: $FORM{'education'}\n"; print MAIL "Base Salary: $FORM{'salary'}\n"; print MAIL "Total Compensation: $FORM{'compensation'}\n"; print MAIL "Skill(s): $FORM{'skills'}\n\n"; print MAIL "Industry(s) with Experience: $FORM{'industry'}\n\n"; print MAIL "Work Experience/Resume: $FORM{'resume'}\n\n"; #Part 3: What You Are Looking For print MAIL "Are you willing to relocate? $FORM{'relocate'}\n"; print MAIL "States willing to relocate to: $FORM{'stateID'}\n\n"; print MAIL "Nations willing to relocate to: $FORM{'countryID'}\n\n"; print MAIL "Relocation Goals:\n $FORM{'goals'}\n\n"; close (MAIL); #redirect to confirmation page print "Location: $confirmation", "\n\n"; exit (0);