Thanks.
Put your email message into $tempfile
$to is the email address you are sending to/
$bcc is if there are any BCC's to send out.
$from senders name
$fromemail is the senders email address
$subject is the subject of the email
then send it with:
open(MAIL,"¦blat $tempfile -t \"$to\" -b \"$bccinfo\" -i \"$from\" -f \"$fromemail\" -s \"$subject\"");
The problem I get when a user hits the form's submit button is that up comes a white screen with a line of blat code at the top and underneath that a message saying 'your enquiry has been...etc'
What I wanted was to either lose that line of blat at the top of the screen (it doesnt look very user friendly)or better still, have the user redirected to my own 'Thanks for your enquiry' page.
Heres the last bit of the code that I think is causing the problem. If you can see where the problem lies, that would be great.
# Build the Blat command line and execute it
$blat="blat.exe message.txt -s \"$subject\" -t \"$lt$raddr$gt$rname\" -server $server -f
\"$lt$saddr$gt$sname\"";
system($blat);
print "Mail sent to $raddr.";
print "<CENTER><H1>Your enquiry has been Submitted!</H1>";
print "<A HREF=http://www.mydomain.co.uk>";
print "<B>CLICK HERE!</B></A> To return to the home page<P>";
print "</CENTER>";
system($blat);
print "Mail sent to $raddr.";
print "<CENTER><H1>Your enquiry has been Submitted!</H1>";
print "<A HREF=http://www.mydomain.co.uk>";
print "<B>CLICK HERE!</B></A> To return to the home page<P>";
print "</CENTER>";
To this:
# Build the Blat command line and execute it
$blat="blat.exe message.txt -s \"$subject\" -t \"$lt$raddr$gt$rname\" -server $server -f
\"$lt$saddr$gt$sname\"";
system($blat);
print "Location: thank-you-page.html\n\n";
Vespa