Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do I get my form to send email

Status
Not open for further replies.

angela5780

Programmer
Feb 23, 2007
3
US
I'm new to perl, I have text boxes set up I need to know how to have it sent to us.

#!/usr/local/bin/perl
read(STDIN,$temp,$ENV{'CONTENT_LENGTH'});
@pairs=split(/&/,$temp);
foreach $item(@pairs)
{

}
print "Content-type: text/html\n\n";
print "<HTML>\n";
print "<BODY BGCOLOR=#FFFFFF>\n";
print "<CENTER>\n";
print "JAPANESE WOMEN BOWING IN TRADITIONAL GREETING";

($key,$content)=split(/=/,$item,2);
$content=~tr/+/ /;
$content=~s/%(..)/pack("c",hex($1))/ge;
$fields{$key}=$content;

print "$fields{fname} $fields{lname}</BR>";
print "$fields{email}<BR>\n";

use CGI ":all";
$radio_action = param("radio_action");
$option = param("option");

print br, "I have agreed to the tems of sale: ", br,
radio_group(-name=>"radio_action",
-values=>['Yes,'],
-default=>'1',-override=>1);
if ($radio_action eq "Yes, I have agreed to the terms of sale")
{

}

$option = param("option");
print "<CENTER>\n";
print header, start_form,


print "Name" ,textfield(-name=>'name'),br, print "Email" ,textfield(-email=>'email'), br;
print submit('Submit');
print "</BODY></HTML>";
print end_html;
 
If you have an SMTP server, use Mail::Sendmail or Net::SMTP. If you don't but are on a linux server, look into using the sendmail program.

-------------
Cuvou.com | The NEW Kirsle.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top