cgiemail is simular in funtionality to the simple formmail.cgi script, but it also allows you to control the format of the email message that is sent. This is done by providing the script with a text template that will be used to format the email message.
Using the cgiemail Script
Step 1: Create an email template.
This is a text file that cgiemail uses to format the results of the feedback form before it emails it. This template must contain an email header, so it might be easiest to take sample template file and leave the email header in place. Upload this file in ASCII mode to the directory of your choice. Be sure your FTP software is using ASCII mode or the script will not work. If you get a "server error" when submitting your form, it is quite likely that you didn't upload in ASCII mode.
The email template file is very flexible, but uses a fairly simple concept. Each variable surrounded by [ ] in the template will be looked for in your form. If it is there, the value that is input for that variable on your form will be replaced in the template file.
Step 2: Create your confirmation page.
This is an HTML document that will be displayed after the user submits the form. You can put anything you want on this page, it just depends on what you want the user to see after they submit the form.
Step 3: Create your form.
It might be easier to copy the HTML from this example and modify it.
Step 4: Update your form tag.
Modify your <form> tag so that it posts to cgiemail as follows:
<form method=POST action="/cgi-bin/cgiemail/template-path-and-filename">