Un-CGI is a frontend for processing queries and forms from the Web on Unix systems. (It can also be run under Windows in some cases). Un-CGI decodes all the form fields and sticks them into environment variables for easy perusal by a shell script, a C program, a Perl script, or whatever you like, then executes whatever other program you specify.
This script uses the mail or sendmail Unix programs and will take the input from a basic form and send it to the correct recipient.