I have used this script to return data from a form
but I can't get it to work. Baffled.
Can anyone help?
# This script:
#
# - Takes the form contents
# - Saves the message into a temporary file
# - Calls Blat to send the mail
#
# Use the cgi unit
use cgi;
# Get the values from the form
$form = new CGI;
$subject="Mortgage Lead";
$tome="info\@domain.co.uk";
$fromme="ADP Server";
$server="smtp.domain.co.uk";
$server="smtp.domain.co.uk";
$lastname=$form->param('lastname');
$firstname=$form->param('firstname');
$dateofbirth=$form->param('dateofbirth');
$address1=$form->param('address1');
$address2=$form->param('address2');
$city=$form->param('city');
$county=$form->param('county');
$postcode=$form->param('postcode');
$firsttime=$form->param('firsttime');
$homemover=$form->param('homemover');
$remortgage=$form->param('remortgage');
$review=$form->param('review');
$std=$form->param('std');
$number=$form->param('number');
$email=$form->param('email');
$lt='<';
$gt='>';
# Output the correct header
print "Content-type: text/html\n\n";
# Save the message into a text file
open (messtxt,">message.txt"
print messtxt ($lastname "\n"
print messtxt ($firstname "\n"
print messtxt ($dateofbirth "\n"
print messtxt ($address1 "\n"
print messtxt ($address2 "\n"
print messtxt ($city "\n"
print messtxt ($county "\n"
print messtxt ($postcode "\n"
print messtxt ($firsttime "\n"
print messtxt ($homemover "\n"
print messtxt ($remortgage "\n"
print messtxt ($review "\n"
print messtxt ($std "\n"
print messtxt ($number "\n"
print messtxt ($email "\n"
close messtxt;
# Build the Blat command line and execute it
$blat="blat.exe message.txt -s \"$subject\" -t \"$tome\" -f \"$fromme\" -server $server\" ";
system($blat);
print $blat;
print "<br><br>Done.<br><br>";
print "Mail sent to $raddr.";
but I can't get it to work. Baffled.
Can anyone help?
# This script:
#
# - Takes the form contents
# - Saves the message into a temporary file
# - Calls Blat to send the mail
#
# Use the cgi unit
use cgi;
# Get the values from the form
$form = new CGI;
$subject="Mortgage Lead";
$tome="info\@domain.co.uk";
$fromme="ADP Server";
$server="smtp.domain.co.uk";
$server="smtp.domain.co.uk";
$lastname=$form->param('lastname');
$firstname=$form->param('firstname');
$dateofbirth=$form->param('dateofbirth');
$address1=$form->param('address1');
$address2=$form->param('address2');
$city=$form->param('city');
$county=$form->param('county');
$postcode=$form->param('postcode');
$firsttime=$form->param('firsttime');
$homemover=$form->param('homemover');
$remortgage=$form->param('remortgage');
$review=$form->param('review');
$std=$form->param('std');
$number=$form->param('number');
$email=$form->param('email');
$lt='<';
$gt='>';
# Output the correct header
print "Content-type: text/html\n\n";
# Save the message into a text file
open (messtxt,">message.txt"
print messtxt ($lastname "\n"
print messtxt ($firstname "\n"
print messtxt ($dateofbirth "\n"
print messtxt ($address1 "\n"
print messtxt ($address2 "\n"
print messtxt ($city "\n"
print messtxt ($county "\n"
print messtxt ($postcode "\n"
print messtxt ($firsttime "\n"
print messtxt ($homemover "\n"
print messtxt ($remortgage "\n"
print messtxt ($review "\n"
print messtxt ($std "\n"
print messtxt ($number "\n"
print messtxt ($email "\n"
close messtxt;
# Build the Blat command line and execute it
$blat="blat.exe message.txt -s \"$subject\" -t \"$tome\" -f \"$fromme\" -server $server\" ";
system($blat);
print $blat;
print "<br><br>Done.<br><br>";
print "Mail sent to $raddr.";