How to install and use CGIEmail using cPanel.
Written by Avesta Sabetian Wednesday, 19 August 2009
This is a easy overview on how to install and then use cgiemail on your cPanel account. If you are with Arvixe, and are on a standard plan, you have cPanel and this tutorial will apply to you. In this example, we will assume our domain name is the subdomain “http://stats.lizard.arvixe.com”.To start, login to cPanel, then follow the following steps.
Installing cgiemail:
Your going to first need a host that can host cgiEmail. Looking for a reliable host? Try cgiEmail Hosting.
1. On the top left of your cPanel, you will find a “Find” box:
2. Inside it, type “cgi” and most of the buttons will disappear except the one we want to use: “CGI Center”. Click on it to enter the CGI Center.
3. Once inside the CGI Center, you will see several options. Look for “CGI email“, it should be near the bottom, click on it:
4. Congratulations! If you see this page when you click “CGI email” then it was just properly installed in your hosting space:
After you see this page, you can press back a couple of times and go back to your cPanel homepage and continue with the rest of this tutorial.
Using cgiemail:
5. We will be doing nothing with that page, its now time to use cgiemail. First, you will need to make a form. Create an .html file in your public_html folder and place the following sample form into it like below. For our purposes, we named it sampleform.html, do the same if you would like to follow along with the tutorial easier
The contents of sampleform.html:
<FORM METHOD=”POST”
ACTION=”http://stats.lizard.arvixe.com/cgi-bin/cgiecho/cgi-bin/sampletemplate.txt”>
Your name: <INPUT NAME=”yourname”><p>
Your favourite colour: <INPUT NAME=”color”><p>
<INPUT TYPE=”submit” value=”Send e-mail”>
</FORM>
A few modifications will have to be made. Change this:
ACTION=”http://stats.lizard.arvixe.com/cgi-bin/cgiecho/cgi-bin/sampletemplate.txt”
To:
ACTION=”http://www.YOURDOMAIN.com/cgi-bin/cgiecho/cgi-bin/sampletemplate.txt”
Of course change “YOURDOMAIN.com” in the above to your domain name.
Great, you have the form setup, it should be at http://www.YOURDOMAIN.com/sampleform.html. In the case of this example, its at http://stats.lizard.arvixe.com/sampleform.html
6. Setting up the template. First make a file inside your “cgi-bin” folder located in your “public_html” folder and call it “sampletemplate.txt”. This will be the email template. Inside it, put the following:
From: [email protected]
[yourname][color]
Of course change the 2 instances of “[email protected]” to your own email address that exists. To test it out, go to the form location on your site:
http://stats.lizard.arvixe.com/sampleform.html
The output should look like this if successful:

If you see the above, thats it! Your done, you just installed your first cgiemail form and sending template. Read on for an explanation and troubleshooting.
The Explanation:
The form is submitting variables into the cgiemail script. So an input like this:
<INPUT NAME=”yourname”>
Will send a variable “yourname” to the cgi script.
And inside of your cgi “template”, sampletemplate.txt, you call the variables.
The “ACTION” in the form is calling the cgi template file:
ACTION=”http://stats.lizard.arvixe.com/cgi-bin/cgiecho/cgi-bin/sampletemplate.txt”
That address consists of 3 items:
First the domain name: http://stats.lizard.arvixe.com
Secondly the location of cgiecho: /cgi-bin/cgiecho
Followed by the location of the sample template file: /cgi-bin/sampletemplate.txt
Combine all three together and you get: “http://stats.lizard.arvixe.com/cgi-bin/cgiecho/cgi-bin/sampletemplate.txt”
Going to it directly will give a template error, disregard.
Thats it!
The above should be sufficient information to get you going with cgiemail. If you run into any problems, feel free to share them in the comments below or in the community forums.


Nice information.
what if my host does not have cgiemail o CGI Email? I found in cPanle a “CGI and Script Lenguage Support”, but insideo of it I dont see any CGI Email
As well, in the file manager I see the directory “/public_html/cgi-bin” but it is empty. Is that normal?
Please note that this information is based on what we offer in our control panel. Your host may be disabling features of the cpanel which are required to do what we do in our posts.
403 error appear.
please help me
http://www.mohammadinternational.com/contact.html
Adil
thanx
now i am able to submit
but i can’t receive any mail which i provided on the text file.
is there some any other solution
please help me
What email address have you specified?
PROBLEM IN SENDING E MAIL THROUGH WEB CONTACT FORM
I am maintaining a website http://www.sriramconsultancyservices.com with a web contact form webpage for customers contacting me. I have configured the same with cgiemail. However, when attempted to send email through the uploaded webpage Contact Us.html, I am getting the following error message
No email was sent due to an error.
403 No variable substitutions in template
Template filename hidden for security reasons
cgiemail 1.6
Kindly help me to correct the problem.
RAMANARAYANAN G
If this is hosted on our servers, please contact the support staff.