feedback.pl

#!/usr/local/bin/perl5
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#                                                               #
# feedback.pl                                                   #
#                                                               #
# Accepts a subject, a message body, and an email address.      #
#                                                               #
# Sends an email to webmaster@schak.com.                        #
#                                                               #
# Returns a brief HTML acknowledgement page.                    #
#                                                               #
# (c) 2000, Benjamin Schak                                      #
# Feel free to use in any way, as long as you keep this notice. #
#                                                               #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

use CGI_UltraLite;

package main;

print "Content-type: text/html; charset=utf-8\n\n";

CGI_UltraLite::postparse();
$subject = $CGI_UltraLite::value[0];
$body    = $CGI_UltraLite::value[1];
$email   = $CGI_UltraLite::value[2];

open (MAIL, "|/usr/lib/sendmail -t");

print MAIL "To: webmaster\@schak.com\n";
print MAIL "From: $email\n";
print MAIL "Subject: WWW form ($subject)\n\n";
print MAIL "$body\n\n";

close (MAIL);

print "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"
\"http://www.w3.org/TR/html4/strict.dtd\">
<html lang=\"en-us\">
<head>
 <title>Feedback</title>
 <meta http-equiv=\"PICS-Label\" content='(PICS-1.1 \"http://www.classify.org/safesurf/\" l gen true for \"http://www.schak.com/\" r (SS~~000 4 SS~~001 6 SS~~0008 2))'>
 <meta http-equiv=\"PICS-Label\" content='(PICS-1.1 \"http://www.rsac.org/ratingsv01.html\" l gen true comment \"RSACi North America Server\" for \"http://www.schak.com/\" on \"1999.06.30T18:38-0800\" r (n 0 s 0 v 0 l 3))'>
 <link rel=\"stylesheet\" type=\"text/css\" href=\"/style.css\">
</head>
<body>
 <h1>
  Feedback
 </h1>
 <div id=\"body\">
  <p>
   Thank you for your input. Have a good day.
  </p>
 </div>
 <div id=\"nav\">
  <ul>
   <li><a href=\"/news\">News</a></li>
   <li><a href=\"/links\">Links</a></li>
   <li><a href=\"/other\">Other</a>
    <ul>
     <li><a href=\"/other/feedback.html\">Feedback</a></li>
     <li><a href=\"/other/schedule.html\">Schedule</a></li>
    </ul>
   </li>
   <li><a href=\"/scripts\">Scripts</a></li>
  </ul>
 </div>
</body>
</html>";