#!/usr/local/bin/perl $mailprog = '/usr/lib/sendmail'; $recipient = 'schristi@garnet.acns.fsu.edu'; print "Content-type: text/html\n\n"; print " School of Criminology and Criminal Justice "; print "

Thank you!

"; print "

Your comments have been submitted to the School of Criminology and Criminal Justice

"; 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; #print "Setting $name to $value

"; $FORM{$name} = $value; } open (MAIL, "|$mailprog $recipient") || die "Can't open $mailprog!\n"; print MAIL "Reply-to: $FORM{'username'} ($FORM{'realname'}) \n"; print MAIL "Subject: School of Criminology and Criminal Justice \n\n"; print MAIL "$FORM{'username'} ($FORM{'realname'}) sent the following\n"; print MAIL "Content:\n\n"; print MAIL "------------\n"; print MAIL "$FORM{'content'}"; print MAIL "\n-------------\n"; print MAIL "Server protocol: $ENV{'SERVER_PROTOCOL'} \n"; print MAIL "Remote host: $ENV{'REMOTE_HOST'}\n"; print MAIL "Remote IP address: $ENV{'REMOTE_ADDR'}"; close (MAIL);