Hei.
A simple perl programme will extract information from a form and send it to you (or anybody else you want to send it to.
The following works OK but you need the path to cgi-bin, path to mail client.
The -w is a perl switch that produces error reporting
It is only so big because I have copied directly from something I use and the HTML takes up a lot of space. Operation of the programme is not dependent on any of the HTML except the text type at the beginning.
Your form must specify METHOD = post
#!/usr/bin/perl -w
%postInputs=readPostInput();
open (MAIL, "|/usr/sbin/sendmail -t"

|| return 0;
select (MAIL);
print <<"EOF";
To: peter\@pgmm.org
From: $postInputs{ 'Contact_Email'}
Subject: $postInputs{ 'Organisation' } Information Requested
$postInputs{ 'Organisation' } Information Requested
Name: $postInputs{ 'Contact_FullName' }
Email; $postInputs{ 'Contact_Email' }
Comments: $postInputs{ 'comments'}
EOF
close(MAIL);
select(STDOUT);
printThankYou();
sub readPostInput(){
my (%searchField, $buffer, $pair, @pairs);
if ($ENV{ 'REQUEST_METHOD' } eq 'POST'){
read(STDIN, $buffer, $ENV{ 'CONTENT_LENGTH' });
@pairs = split(/&/, $buffer);
foreach $pair (@pairs){
($name, $value) = split(/=/, $pair);
$value=~tr/+/ /;
$value=~s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$name=~tr/+/ /;
$name=~s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$searchField{ $name} = $value;
}
}
return (%searchField);
}
sub printThankYou(){
print<<"EOF";
Content-Type: text/html
<HEAD>
<Title>THANK YOU FOR YOUR REQUEST</TITLE>
<style "onmouseover">A:hover {color: #0000ff; font-weight: bold}
</style>
<style "text/css">A{text-decoration: none;}</style>
</HEAD>
<BODY>
<br>
<body bgcolor="#fffafa" text=""="#000000" link ="black" vlink "#add8e6">
<table border="0" width="100%">
<tr>
<td width="40%"><img src="
width="316" height="162"></td>
<td width="60%">
<table border="0" cellpadding="2" cellspacing="2" align="center" width="100%" cellpadding="2">
<tr>
<td style="border: 2 ridge #0000ff" align="center" width="31%" bgcolor="silver"><font face="Eras Demi ITC" size="2"><a href="
title="key economic data from the world's emerging and leading economies">World in numbers</a></td></font>
<td style="border: 0" width="3%"></td>
<td style="border: 2 ridge #0000ff" align="center" width="31%" bgcolor="silver"><font face="Eras Demi ITC" size="2"><a href="
grants for companies within the EU">EU Grants</a></td></font>
<td style="border: 0" width="3%"></td>
<td style="border: 2 ridge #0000ff" align="center" width="31%" bgcolor="silver"><font face="Eras Demi ITC" size="2"><a href="
title="EU grants for companies outside the EU">Eastern Europe</a></td></font>
</tr>
<tr>
<td style="border: 2 ridge #0000ff" align="center" width="31%" bgcolor="silver"><font face="Eras Demi ITC" size="2"><a href="
Analysis Critical Control Points">HACCP</a></td></font>
<td style="border: 0" width="3%"></td>
<td style="border: 2 ridge #0000ff" align="center" width="32%" bgcolor="silver"><font face="Eras Demi ITC" size="2"><a href="
title="Archive of economic data and The PGMM Group Brief Guides available in PDF format">Downloads</a></td></font>
<td style="border: 0" width="3%"></td>
<td style="border: 2 ridge #0000ff" align="center" width="31%" bgcolor="silver"><font face="Eras Demi ITC" size="2">Commentary</td></font>
</tr>
<tr>
<td style="border: 2 ridge #0000ff" align="center" width="31%" bgcolor="silver"><font face="Eras Demi ITC" size="2"><a href="
title="European Foundation for Quality Management">EFQM</a></td></font>
<td style="border: 0" width="3%"></td>
<td style="border: 2 ridge #0000ff" align="center" width="31%" bgcolor="silver"><font face="Eras Demi ITC" size="2"><a href="
title="Implementation guides for various programmes">Brief Guides</a></td></font>
<td style="border: 0" width="3%"></td>
<td style="border: 2 ridge #0000ff" align="center" width="32%" bgcolor="silver"><font face="Eras Demi ITC" size="2"><a href="
Us</a></td></font>
</tr>
<tr>
<td style="border: 2 ridge #0000ff" align="center" width="31%" bgcolor="silver"><font face="Eras Demi ITC" size="2"><a href="
<td style="border: 0" width="3%"></td>
<td style="border: 2 ridge #0000ff" align="center" width="31%" bgcolor="silver"><font face="Eras Demi ITC" size="2"><a href="
Us</a></td></font>
<td style="border: 0" width="3%"></td>
<td style="border: 2 ridge #0000ff" align="center" width="31%" bgcolor="silver"><font face="Eras Demi ITC" size="2"><a href="
</tr>
</tr>
</table>
</table>
<center>
<font face="Eras Demi ITC" size="5"><b>Thank You $postInputs{ 'Contact_FullName' } </b></font></center><br>
</center><font face="Eras Demi ITC" size="3">
<p style="margin left: 10">for sending us your message. If you have asked for information or your message requires an answer we will contact you shortly.<br><br>
Peter Murrell<br>
Managing Partner<br><br><br>
<font color="gray">We have noted your contact email address as " $postInputs{ "Contact_Email" }", If this is incorrect please use your browser's back button to correct our mistake.</p>
</font>
<br><br><br><br>
<font face="Times Roman" size="2"><i><a href="
copyright:  The PGMM Group<br>
Last updated:  October 2000<br>
This site designed and maintained by Santa Stefano Software<br>
<a href="
</i></font>
</body>
</HTML>
EOF
}