Sorry to bother you again . . . I have a couple of quick questions about
this CGI.pm script which is working fine now, mostly thanks to you!
use CGI qw(:standard);
$lastname = param('LName');
$firstname = param('FName');
$address = param('Address');
$add2 = param('Add2');
$city = param('City');
$state = param('State');
$zip = param('Zip');
$telephone = param('Telephone');
$fax = param('FAX');
$email = param('Email');
$incom = param('Comments');
@qty = param('Qty');
@product = param('Product');
@price = param('Price');
@subtot = param('SubTotal');
$timenow = localtime;
$fromuser = 'email@example.com';
$to = $email;
$subject = 'Contact Message';
"Contact Message received on $timenow
THIS ORDER HAS BEEN PLACED PENDING APPROVAL OF YOUR CREDIT CARD
INFORMATION. YOU WILL BE CONTACTED IF THERE IS A PROBLEM.
End Contact message
$smtp = Net::SMTP->new('localhost');
$ThePage = <<"BLARG";
<META HTTP-EQUIV="REFRESH" CONTENT="5;
<h3 align = center>Processing order . . .</h3>
<p align = center>The process should continue in 5 seconds</p>
<p align = center>If you don't want to wait, <a
print "content-type: text/html\n\n";
When I display the contents of the variables: @qty, @product, @price, and
@subtot in my mail readout (the part that begins with
"-------------------------------------------- Contact Message received on
$timenow . . .) is there a way I can format the multiple values found in
each of these variables? Here's what I mean: if someone were to order 4
items, right now I get the results as
Is there a bit of code to format the results as:
Also, using the "use Net::SMTP;" command, is there a way I can cc: to the
If I can clear up these two issues, I won't be pestering you again. I was
impressed with the speed and insight you showed last time (although mostly
it was just finding a dumb mistake on my part =+0 )
I volunteered to answer no more than 4 questions a day here, so do not
feel ashamed asking.
Perl is really powerful in formatting print output, though it seems that
people tend to forget this. Perl was originally developed for writing text
reports, thus there are fairly well formatting commands.
To get detailed information visit
I have not used it ever though.
To CC someone of the mail you can try to add another $smtp->to() adressee.
I do not know if it work or not. If not then you have to send the mail
twice. Also add $smtp->data("Cc: addressee") to the header part.
[ back to toc ]