It keeps saying it can't find page in browser.I've tried changing up the file extension. The only thing I can think of is the reference to the mail program does not point to anywhere on my site. I have a couple of other programs that may work. If anyone could look at them and thinks they could help please let me know. I could send you the other scripts for a look.
Thanks
email.cgi
#!/usr/bin/perl
%postInputs = readPostInput();
open (MAIL, "|/usr/sbin/sendmail -t" || return 0;
select (MAIL);
print<<"EOF";
To: JeffJ\ @wayne-ent.com
From: $postInputs{ 'email' }
Subject: Message Board Reply
Email Registration
Name: $postInputs{ 'TheName' }
Email: $postInputs{ 'Email' }
Company Name: $postInputs{ 'Company'}
Address: $postInputs{ 'address' }
Phone: $postInputs{ 'Number' }
Contact: $postInputs{ 'Contact' }
Info: $postInputs{ 'Info' }
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 REGISTERING!</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="document">
</HEAD>
<BODY>
<TABLE CELLSPACING=2 CELLPADDING=2 border=0 width=600>
<TR>
<BR>
<CENTER>
<FONT SIZE=+3><B>Thank You</b> </font></center><BR><BR>
<CENTER><B> <FONT SIZE=+1>
<P>Thank you $postInputs{ 'Name' } for regisering <BR>
</FONT></B><CENTER>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
EOF
}
Thanks
email.cgi
#!/usr/bin/perl
%postInputs = readPostInput();
open (MAIL, "|/usr/sbin/sendmail -t" || return 0;
select (MAIL);
print<<"EOF";
To: JeffJ\ @wayne-ent.com
From: $postInputs{ 'email' }
Subject: Message Board Reply
Email Registration
Name: $postInputs{ 'TheName' }
Email: $postInputs{ 'Email' }
Company Name: $postInputs{ 'Company'}
Address: $postInputs{ 'address' }
Phone: $postInputs{ 'Number' }
Contact: $postInputs{ 'Contact' }
Info: $postInputs{ 'Info' }
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 REGISTERING!</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="document">
</HEAD>
<BODY>
<TABLE CELLSPACING=2 CELLPADDING=2 border=0 width=600>
<TR>
<BR>
<CENTER>
<FONT SIZE=+3><B>Thank You</b> </font></center><BR><BR>
<CENTER><B> <FONT SIZE=+1>
<P>Thank you $postInputs{ 'Name' } for regisering <BR>
</FONT></B><CENTER>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
EOF
}