Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form script: Unknown path error trying to run on Windows server

Status
Not open for further replies.

darren123

Technical User
Oct 6, 2006
2
AU
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 &quot;<P> server error - please contact our office \n&quot;;
exit;
}
 
This isn't as easy as it sounds, because there is no direct equivalent for Sendmail on an NT machine.
I wrote an email script to run on my NT server, but it required an extra DLL to get past the permissions issues on NT (try Blat for this, although I used Geocel Devmailer - which cost $99 for a liscence).

Or (and I haven't tried this) use NET::SMTP module.

Failing all that you could use something like Formail, by Matt Wright...I know that works well on NT and it could handle all the information you might want from the form.

Hope this helps

Jez
;-)
 
I know that blat is the most commonly used substitute for sendmail on Win servers. I've never used it, but it shouldn't be that difficult to make the substitution. Try searching in the faqs or this forum for &quot;blat&quot;.
Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top