this is annoying!
I tryng to get an email form to work using cgi/perl but i dont know anything about perl so if any body could help my






:
#!/usr/bin/perl
# The following accepts the data from the form
if ($ENV{'REQUEST_METHOD'} eq 'POST') {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@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;
}
# The following sends the email
open (MESSAGE,"| /usr/sbin/sendmail -t");
print MESSAGE "To: $FORM{to}\n";
print MESSAGE "From: $FORM{name}/n";
print MESSAGE "Reply-To: $FORM{email)/n";
print MESSAGE "Subject: website email\n\n";
print MESSAGE "Wrote:\n\n";
print MESSAGE "$FORM{body}\n";
close (MESSAGE);
&thank_you;
}
#The following creates the Thank You page display
sub thank_you {
print "Content-type: text/html\n\n";
print "<HTML>\n";
print "<HEAD>\n";
print "<TITLE>Thank You!</TITLE>\n";
print "</HEAD>\n";
print "<BODY BGCOLOR=#000000 TEXT=#00ced1>\n";
print "<H1>Thank You!</H1>\n";
print "\n";
print "<P>\n";
print "<H3>I will reply within a week..<BR>\n";
print "<h4>Hope you like my site.</h4>\n";
print "<P>\n";
print "</BODY>\n";
print "</HTML>\n";
exit(0);
}