#!/usr/local/bin/perl $mailprog = '/usr/bin/mail'; $recipient = 'nmuller@ddx.com'; print "Content-type: text/html\n\n"; print "The Webmaster's Workshop"; print "

Thank you for signing the Guest Book . . .

"; 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; } if ($FORM{'e-mail'} eq "") {$FORM{'e-mail'} = '';} if ($FORM{'name'} eq "") {$FORM{'name'} = '';} open (MAIL, "|$mailprog $recipient $FORM{'e-mail'} $FORM{'NAME'}") || die "Can't open $mailprog!\n"; print MAIL "This is a Guest Book entry from $FORM{'name'} who is reachable at $FORM{'e-mail'}:\n"; print MAIL "\n"; print MAIL "$FORM{'name'}'s organization is: $FORM{'organization'}\n"; print MAIL "\n"; print MAIL "---------------------------------------------------------------------------\n"; print MAIL "\n"; print MAIL "Here are the topics $FORM{'name'} would like to know more about:\n"; print MAIL "\n"; print MAIL "$FORM{'topics'}\n"; print MAIL "\n"; print MAIL "---------------------------------------------------------------------------\n"; print MAIL "\n"; print MAIL "Here is how $FORM{'name'} learned about The Webmaster's Workshop:\n"; print MAIL "\n"; print MAIL "$FORM{'sources'}\n"; print MAIL "\n"; print MAIL "---------------------------------------------------------------------------\n"; close (MAIL); print "Your input will assist us in our continuing efforts to develop and improve The Webmaster's Workshop.

\n"; print "Return to the Main Menu\n";