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"; ALL if($reply) { print ""; } else { print ""; } print "
You sent the following message:
Name: $name
Email: $email
URL: $url
Message: $message
Reply:yes
"; exit; } else { print "Please fill in a message.\n"; }} } else { print "Please fill in your email address.\n"; } } else { print "Please fill in your name.\n"; } print <<"ALL";

Thank you for visiting my site. If for any reason you want to contact me, whether it be for site bugs, custom work or just a "Hey, you!", please feel free to contact me.

If you request a reply, expect it within the next 12-24 hours.

Name:
Email:
URL:
Message:
Do you want a reply? (checked = yes)
ALL