#!/usr/bin/perl use CGI qw(:standard); $posting=param('posting'); if (defined $posting) { # this section only happens when the form is submitted $email=param('ab_email'); # your email may not be /bin/mail open MAIL, "|/bin/mail -s \"IT User Request\" itstaff\@yourcompany.com"; $requestor="|/bin/mail -s \"Your IT User Request\" $email"; open MAILO, $requestor; print MAIL "Subject: IT user request\n\n"; print MAILO "$Subject: Your IT user request\n\n"; print MAILO "\nConfirming your request:\n\n"; # print the results to mail foreach $i (param) { # skip the posting flag next if $i =~ /posting/; foreach $j (param($i) ) { $v=$i; # strip off the prefix $v =~ s/^.._//; print MAIL "$v = $j\n"; print MAILO "$v = $j\n"; } } print header, < IT User Request

Accepted, thank you

EOF foreach $i (param) { next if $i =~ /posting/; foreach $j (param($i) ) { $v=$i; $v =~ s/^.._//; print "
$v = $j\n"; } } print < EOF exit 0; } # this is what happens when the script is first called print header, < IT User Request

IT User Request

# # you can modify any of these. The first 3 characters of # the variable names let us easily control order if we need to #

Requested by:

Your email:

Your telephone:

New User Terminated User

User's Login

User's name:

(if new) Desired password:

Systems to add or terminate:

Network

Unix

File and Print

E-Mail

E-Fax

Telephone/Voice Mail

#

EOF