utility has been superseeded, we now recommend
that collects information that a user has submitted in a web page form,
and then emails it to someone, and optionally can CC to another address.
This could be used for collecting information, or for help requests or
bug reports etc...
Please read this page,
it should contain everything you need to know about setting up CGIMAIL,
only then if you still cannot figure it out, you should email your problem,
explaining exactly how you have it set up to firstname.lastname@example.org
Yes, we do not charge
for the use of this software. You may copy and distribute it as you wish.
As such, it comes with no guarantee of any sort. If you find any bugs,
please report them to email@example.com
as we do like to have bug free programs :-)
know of you need it compiled on another platform: firstname.lastname@example.org
Download, uncompress it (type in "uncompress cgimail...tar.Z"),
then untar it (type in "tar -xvf cgimail....tar), then copy cgimail.cgi
into your cgi-bin directory. If it does not work, create the .log file,
and make sure all of its files have the permissions of 'nobody' (use chown
and chgrp commands).
Download, copy it into your cgi-bin directory (this file
is not compressed) you should rename it to "cgimail.exe"
OSX Install Notes:
Download and install like for UNIX Install above, but you
want to have the ownership owner:group settings set to root:staff so that
cgimail has the correct ownership for executing correctly.
Once it is in your
cgi-bin directory, you can run it by typing
(or on windows type in ".\cgimail.exe make_ini_file")
It will ask you if you want to make a demo .ini file, type in "y".
edit the file ./cgimail10.ini and correct the incorrect lines. Or you
can copy the examples and ini file from below, and modify them from there.
On unix servers, if you are not installing on a local machine, then you
have to have telnet access to change the permissions or run the program
(to make the demo ini file).
On windows machines, if you are not installing on a local machine, then
you have to have some means of installing like PCAnywhere or Control IT.
On some unix servers you cant change the permissions to "nobody" unless
you are the superuser "root", if you dont have "root" access you'll have
to ask someone in charge to set it for you.
You cannot run programs or change permissions through an FTP client! :-)
For unix systems,
you need to make sure that you have the correct access permissions set
on the cgimail files, the account "nobody" is usually used for web access,
and that is what you should set it to.
You also need to make sure that the cgimail file you are installing matches
the platform that you are installing it to.
Are you getting 404
or 405 errors when you click on the Submit button? The 404 means that
the cgimail.exe file is not where you thought it was. You'll need to check
that the "action" variable inside the "<form>" tag is pointing at
the right file, and that the file is in the right place.
How it works
The 405 error means that the post cant be sent to the cgimail.exe file,
because it either has the wrong permissions set on it (unix only problem
so far), or that the web server doesnt think that that particular directory
is valid for executable files, in this case you need to find the right
directory, and put the cgimail files there, or consult your web server
documentation to see how you are supposed to have cgi compiled script
You can copy the program
file to an alternative name, to be able to run multiple configurations
from the same directory. The program uses an .ini and .log file of the
same name. So if you rename it to "mailer.exe" it would use
"mailer.ini" and mailer.log" files.
The program is run
when a form submission occurs, this can come from any html page that points
to your cgi program. You make a HTML page that has a form in it, and make
the form action value point to the cgi on your server. Set action value
of the form variable like this: action="/cgi-bin/cgimail10.exe",
make sure that you get the name of the cgi program correct, as you can
rename it to be anything you want.
The form must point to the cgi program for the post action to succeed.
The form must, of course, have a submit button in it!
All of the form elements that are submitted do not have to be emailed,
you must name all of the form elements that are to be included in the
email, in the INI file (see ini settings below), you can specify that
all form elements are to be sent.
Here is a sample html
file that has a form in it that shows how you might set it up:
You can, of course,
put the form on any of your web pages.
Once you have done this, the form would contain the variables "Name:".
These must be specified in the ini file if you wish them to be included
in the email.
Here is an example .ini file:
(see below for meanings of ini settings):
Here is a sample output email, based on the sample html
and ini files above:
There must be no spaces
before an ini file setting, one space after it, and the value for the
setting goes directly after that space.
||Use to specify
smtp server, e.g. "smtp 127.0.0.1"
||This is only
available in version 1.0g, Makes CGIMAIL use HELO (slower, for old
email servers) instead of EHLO (faster, for new email servers).
||Force simple carrige return only when posting email.
||Uses full linefeed and carrige return when posting email.
When constructing header lines, cgimail will add a colon.
i.e. you can have a setting
cgimail will find a variable called "From" and write it
as "From:" in the headers of the email.
This function is useful if you want to use java script in the html
file to process the variable. (version 1.0s)
||Use to remove
the single space prefix in the email (all lines in the body) This
keyword is only available in version 1.0d
||Use to specify
logging for (debug/errors) set it to "errors" for errors
to be logged, "debug" includes additional information.
true" to have all submitted variables t be sent in the body.
If it is set to true, you should not worry about setting any "use_submitted_variable_for_bodycontent"
||The full path
name of an HTML file to show if the email was successfully sent.
||The full path
name of an HTML file to show if there was any sort of failure for
sending the email. If you do not care if the email is successfully
sent or not, you can make both success and failure point to the same
Use this to
specify a header that does not require any submitted information.
e.g. to always have the email sent to the same email address "JoeBloggs@MyISP.com",
use 'headerline To: "Joe" <JoeBloggs@MyISP.com>'
If you set a
CC: headerline, a copy of the email will be sent to that address
Use this to
have a header created with the value from the submitted form information.
The form variable
name must be the header name. e.g. If submitted variable "Subject:"
is set to "Bug report", then "use_submitted_variable_for_headerline
Subject:" outputs "Subject: Bug report"
Use this line
to have a line of text included in the email. e.g. "bodycontent_line
Use this to
have a variable value to be included in the body of the email from
the submitted form information. The value of the variable is prefixed
with the name of the variable.
Name:" (when "Name:" contains the value "Joe
Bloggs") outputs "Name: Joe Bloggs"