I am trying to run a simple form script to email the results of data entered by the user on a webpage to an email address. The problem I have is that when the script runs it gives an error saying "cannot find the specified path". Some people thought that the subparseform.lib file was not in the same directory as my scrpt but it is. My administrator has told me it is because the script is running off a windows server and not a unix server and that the following line needs to be changed for windows as it only works on Unix.
MAIL,"|/usr/sbin/sendmail -t"
Can anyone please tell me what this line needs to be for windows? The full script is below.
thanks,
Darren.
#!/usr/local/bin/perl
require "subparseform.lib";
&Parse_Form;
$email1 = "dreamtim\@dreamtime.com.au";
$first1 = $formdata{'first_name'};
$tomail = "dschembri\@bigpond.com";
print "Content-type: text/html\n\n";
open (MAIL,"|/usr/sbin/sendmail -t"
||&ErrorMessage;
print MAIL "To: $tomail \nFrom: $email1 \n";
print MAIL "Subject: Website Feedback \n";
print MAIL "The following name has been entered ($first1)\n";
close (MAIL);
sub ErrorMessage {
print "<P> server error - please contact our office \n";
exit;
}
MAIL,"|/usr/sbin/sendmail -t"
Can anyone please tell me what this line needs to be for windows? The full script is below.
thanks,
Darren.
#!/usr/local/bin/perl
require "subparseform.lib";
&Parse_Form;
$email1 = "dreamtim\@dreamtime.com.au";
$first1 = $formdata{'first_name'};
$tomail = "dschembri\@bigpond.com";
print "Content-type: text/html\n\n";
open (MAIL,"|/usr/sbin/sendmail -t"
print MAIL "To: $tomail \nFrom: $email1 \n";
print MAIL "Subject: Website Feedback \n";
print MAIL "The following name has been entered ($first1)\n";
close (MAIL);
sub ErrorMessage {
print "<P> server error - please contact our office \n";
exit;
}