Hi,
I am having a problem with my form mailer. At the moment the script will send me a message but there are no contents. Where have I gone wrong?
script is:
#!c:\Perl\bin\Perl.exe -w
use strict;
use CGI ':standard';
my($to, $company, $name, $email, $problem1);
my $mailprog = 'c:\inetpub\scripts\we4.0\sendmail';
print "Content-type:text/html\n\n";
$to = 'ira@2cc.com';
$company = param('company');
$name = param('name');
$email = param('email');
$problem1 = param('problem1');
open (MAIL, "|$mailprog -t"
;
print MAIL "To: $to\n";
print MAIL "Subject: Service Request\n";
print MAIL "Company: $company\n";
print MAIL "Name: $name\n";
print MAIL "E-mail: $email\n";
print MAIL "Problem1: $problem1\n";
close (MAIL);
print '<head><style>body{font-family:verdana;font-size:10pt;}</style></head>';
print '<body><h3>Thank You!</h3> you will receive an email copy of this request.</body>';
I am having a problem with my form mailer. At the moment the script will send me a message but there are no contents. Where have I gone wrong?
script is:
#!c:\Perl\bin\Perl.exe -w
use strict;
use CGI ':standard';
my($to, $company, $name, $email, $problem1);
my $mailprog = 'c:\inetpub\scripts\we4.0\sendmail';
print "Content-type:text/html\n\n";
$to = 'ira@2cc.com';
$company = param('company');
$name = param('name');
$email = param('email');
$problem1 = param('problem1');
open (MAIL, "|$mailprog -t"
print MAIL "To: $to\n";
print MAIL "Subject: Service Request\n";
print MAIL "Company: $company\n";
print MAIL "Name: $name\n";
print MAIL "E-mail: $email\n";
print MAIL "Problem1: $problem1\n";
close (MAIL);
print '<head><style>body{font-family:verdana;font-size:10pt;}</style></head>';
print '<body><h3>Thank You!</h3> you will receive an email copy of this request.</body>';