my $name = param('name'); my $email = param('email'); my $url = param('url'); my $message = param('message'); my $reply = param('reply'); print header, start_html('Contact the webmaster'); if (param('Submit')) { if($name) { if($email) { if($message) { open (MAIL, "|$sendmail -t") or die "Cannot access mail"; print MAIL "To: $adminmail\n"; print MAIL "From: $email\n"; print MAIL "Subject: $subject\n\n"; print MAIL "Who: $name\n"; print MAIL "Where: $email\n"; print MAIL "Message: $message\n"; print MAIL "Reply: $reply\n"; close(MAIL) or die "Cannot close sendmail $!"; print <<"ALL";
| You sent the following message: | ||
| Name: | $name | |
| Email: | ||
| URL: | $url | |
| Message: | $message | |
| Reply: | ALL if($reply) { print "yes | "; } else { print ""; } print " |