Back in the day when my horn was very green and I was still wet behind the ears, I had the misfortune to be signed up with a web host whose technical support assured me that, Yes, I had a cgi-bin, and Yes, I could run Perl scripts but, No, they did not know the path to Perl. (No kidding.)
If you're trying to install NMS FormMail and your web host's technical support is similarily "out to lunch" (either literally or figuratively) but you know you have a cgi-bin then don't give up just yet.
First of all, you have just reached the bottom line of hardcore web development which clearly states:
YOU ARE YOUR OWN TECHNICAL SUPPORT.
Now..
Bravely step forward, take a deep breath, yell "I'm as mad as hell and I'm not going to take it anymore!" (optional) and then try the following steps to derive the correct path to Perl (a.k.a. shebang line). This will then allow you to run a special Perl script which will guess the correct path to Sendmail.
(If you already know the path to Perl and are now just trying to get your path to Sendmail, click here.)
Okay let's do it to it...
Copy and paste the simple "Hello World" test script that appears below into a good text editor (like Metapad) that can convert text to Unix line endings.
Save this script as test.pl using UNIX LINE ENDINGS. (To convert to Unix line endings in Metapad, press Ctrl + 2 on your keyboard.)
Upload test.pl to your cgi-bin directory (or your website's equivalent like cgi or cgi-lib). Make sure you upload it in ASCII MODE (instead of binary).
Use the chmod command in your FTP program or use your website's control panel to change the file permissions of test.pl to 755 (rwx r-x r-x).
Type http://www.your_site.com/cgi-bin/test.pl into the address bar of your browser and hit GO. (Replace www.your_site.com with your domain name.)
Your web browser should now display a blank page with the words "hello world!" printed on it.
IF THIS WORKED:
The first line of code in the test.pl script that is currently in your cgi-bin is the correct path to the Perl interpreter installed on your web server's computer. Save this version of test.pl to your hard drive for future reference and then continue on to step #7 below.
IF THIS DID NOT WORK:
The first line of code in the test.pl script that is currently in your cgi-bin is probably not the correct path to the Perl interpreter installed on your web server's computer. Go back to step #1 and click on the "Switch shebang line" button. Then repeat steps 1 through 6.
Okay now that we have the correct path to Perl, we can run Perl scripts on your website. So altogether now— "Yeah? And?" (*chuckle*) Well, as fortune would have it, there is a free Perl script out there to be had that can be used to derive the correct path to Sendmail. Visit the good people at perlscriptsjavascripts.com and download your free copy of e-Vars, a neat little program which will —among other things— make a pretty good attempt at guessing your web server's path to Sendmail.
After downloading and unpacking the vars.zip file, upload it to your cgi-bin and then use the chmod command in your FTP program or use your website's control panel to change the file permissions of myserver.cgi to 755 (you should be familiar with this process by now).
Type http://www.your_site.com/cgi-bin/myserver.cgi into the address bar of your browser and hit GO. (Replace www.your_site.com with your domain name.)
Your web browser should now display a detailed list of environment variables as well as the Path(s) to Sendmail configured on your web server.