#!/usr/bin/perl
require("/www/cgi-bin/cgi-lib.pl");
&ReadParse;
open (MAIL, "|/usr/sbin/sendmail -t");
print MAIL "To: $in{'mailto'}\n";
if (($in{'mailfrom'} ne "")
 && (substr($in{'mailfrom'},0,1) ne " "))
     {print MAIL "From: $in{'mailfrom'}\n";}
   else
     {print MAIL "From: Browser@$ENV{'REMOTE_HOST'}\n";}
print MAIL "Subject: $in{'subject'}\n\n";
print MAIL "$in{'body'}";
close MAIL;
print "Content-Type: text/html\n\n";
print "<html>\nThank You For Signing Our Guestbook!\n</html>\n";
exit;

