How to install and use CGIEmail using cPanel.

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:

The findbox is highlighted on the top left. Once you found it, continue to step 2.

The findbox is highlighted on the top left. Once you found it, continue to step 2.

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.

Click on "CGI Center" and continue to step 3.

Click on "CGI Center" and continue to step 3.

3. Once inside the CGI Center, you will see several options. Look for “CGI email“, it should be near the bottom, click on it:

Find "CGI email", click on it and continue to the next step.

Find "CGI email", click on it, and continue to the next step.

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.

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:

To: youremailaddress@yourdomain.com

From: youremailaddress@yourdomain.com

[yourname]

[color]

Of course change the 2 instances of “youremailaddress@yourdomain.com” 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.

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.

IMPORTANT: Once debugging is completed, please replace ‘cgiecho’ with ‘cgiemail’ to give live.

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.

IMPORTANT: Once debugging is completed, please replace ‘cgiecho’ with ‘cgiemail’ to give live.

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.

Tags: , , , , | Posted under CGIEmail / FormMail, cPanel/Linux Hosting | RSS 2.0

7 Comments on How to install and use CGIEmail using cPanel.

  1. Mike says:

    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?

  2. adila says:

    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

  3. 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

Leave a Reply

Your email address will not be published. Required fields are marked *


− 3 = 4

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>