The script I wrote below seems to be submitting a response to the (customers email), but is not sending the customers response to me as the (employee)of their requests.
Could someone look over this script within the (email to employee)section & see if there might be something I am overlooking???
I am also enclosing the html page which might help you determine why this script is having a problem working within that area. Again, it is most likely an over sight of something that you may see in which I dont!
Any help is appreciated.
Thank you in advanced.
#!/usr/local/bin/perl
#Perl subroutine Script
require "cgi-lib.pl";
&ReadParse;
#mail program
$mailprog='/var/qmail/bin/qmail-inject';
#perl subroutine content-type
print &PrintHeader;
unless (-e $mailprog)
{
print <<"PrintTag";<br>
Cannot find $mailprog.
There is a typo in the mail program path.
PrintTag
exit(0);
}
#web page (Form confirmation)
print <<"PrintTag";<br>
confirmation
Thank You!
Thanks for filling out our form.
Check your e-mail for a message from us.
HomePrintTag
#----------(email) to customer------------
#open mail program
open (MAIL, "|$mailprog") || die "Can't open $mailprog
";
#message header
print MAIL "To: $in{'email'}
";
print MAIL "Reply-To: $in{'myemail'}
";
print MAIL "From: $in{'myemail'}
";
print MAIL "Subject: Your catalog request.
";
#body of message
print MAIL <<"PrintTag";<br>
Dear $in{'custname'}:
Thank you for writing. This e-mail confirms that
we have received your request for a catalog.
Please look for it soon!
Sincerely yours,
B.R
PrintTag
#close mail program, send email to client
close(MAIL);
#----------(email) to employee------------
#open mail program
open (MAIL, "|$mailprog") || die "Can't open $mailprog
";
#message header
print MAIL "To: $in{'myemail'}
";
print MAIL "Reply-To: $in{'email'}
";
print MAIL "From: $in{'email'}
";
print MAIL "Subject: Catalog Order.
";
#body of message
print MAIL <<"PrintTag";<br>
Please rush a catalog to:
$in{'custname'}
$in{'street'}
$in{'city'} $in{'state'} $in{'zip'}
$in{'country'}
$in{'comments'}
PrintTag
#close mail program, send email to employee
close(MAIL);
#end of program
----------Html page -------------
Catalog
Please enter email address:
Name:
Address:
City:
State:
Zip:
Country:
Comment Field: