frozenpeas
Technical User
Here are the error messages I'm getting in my log:
cgi-bin and mail.cgi are set at 755. I can run other cgi scripts... just not this one.
Here is the script:
Can anyone see what's wrong? Thanks.
Code:
[Thu Jul 11 21:57:57 2002] [error] (2)No such file or directory: exec of /home/frozen/html/cgi-bin/mail.cgi failed
[Thu Jul 11 21:57:57 2002] [error] [client 24.72.10.196] Premature end of script headers: /home/frozen/html/cgi-bin/mail.cgi
cgi-bin and mail.cgi are set at 755. I can run other cgi scripts... just not this one.
Here is the script:
Code:
#!/usr/bin/perl
require "subparseform.lib";
&Parse_Form;
$Email = $formdata{'sender_email'};
$FirstName = $formdata{'sender_name'};
$Company = $formdata{'Company'};
$ToComments = $formdata{'message'};
$HearAbout = $formdata{'HearAbout'};
$ToEmail = "email\@hotmail.com";
$ToSubject = "Message from website visitor";
$EmailBody = "Sent By: $FirstName\nSenders Email: $Email\nSenders Company: $Company\n\n
Message Sent:\n$ToComments\n\nSender Heard About Site From: $HearAbout\n";
$EmailFooter = "\nThis message was sent by: $FirstName. If you feel that you
recieved this e-mail by accident please contact us at [URL unfurl="true"]www.yourSite.com";[/URL]
$Message = $EmailBody.$EmailFooter;
open (MAIL, "|/usr/sbin/sendmail -t") || &ErrorMessage;
print MAIL "To: $ToEmail \nFrom: $Email\n";
print MAIL "Subject: $ToSubject\n";
print MAIL "$Message\n";
close (MAIL);
print "Content-type: text/html\n\n";
print "_root.Mail.EmailStatus=Complete - Your mail has been sent";
sub ErrorMessage {
print "Content-type: text/html\n\n";
print "_root.Mail.EmailStatus=Connection Failed Please Check the path to the Mail program";
exit; }
Can anyone see what's wrong? Thanks.