the sendmail program in my server is at:
usr/lib/sendmail (I dont know if this helps)
I have placed the FormMail.pl(& tried it with FormMail.cgi as well) into my cgi-bin and coded the formas follows:
<form action="/cgi-bin/FormMail.cgi" method="post">
<INPUT TYPE="hidden" NAME="subject" VALUE="Mail from website">
<INPUT TYPE="hidden" NAME="recipient" VALUE="email@email.com">
<INPUT TYPE="hidden" NAME="redirect" VALUE="thankyou.html">
<INPUT TYPE="hidden" NAME="required" VALUE="email">
<INPUT TYPE="hidden" NAME="missing_fields_redirect" VALUE="www. URL.com/contact.html">
<INPUT TYPE="hidden" NAME="env_report" VALUE="REMOTE_HOST, REMOTE_ADDR, HTTP_USER_AGENT">
<br>
Name:<br>
<input name="textfield5" type="text" size="30" maxlength="40">
<br>
email:<br>
<input name="textfield32" type="text" size="30" maxlength="40">
<br>
<span class="bold">Message:</span><br>
<textarea name="textarea" cols="40" rows="9"></textarea>
</p>
<blockquote>
<p class="bold">
<input type="submit" name="Submit3" value="send">
<input type="reset" name="Submit22" value="clear message">
<br>
<p class="bold"></p>
</blockquote>
</form>
I dont exactly know what it is that I am doing wrong I have tried to contact the support team on my webhost but they are a joke!
can someone please help me out and let me know if this code is correct? I have also edited the perl script per the readme file that came with it.
I need to know if there is some thing wrong with the form script so that if its not then I will know its got some thing to do with the perl script.
oh yeah everytime I test the form it send me to this SBox error page and says some thing about too many processes running at the same time?
heres the text as it appears on the page:
Sbox Error
The sbox program encountered an error while processing this request. Please note the time of the error, anything you might have been doing at the time to trigger the problem, and forward the information to this site's Webmaster (admin@my crappy host.com).
Stat failed. /mnt/mss-1/vol4/web/e/es/est/www.my url name.com/cgi-bin/FormMail.cgi: No such file or directory
------------------------------------------------------------
sbox version 1.04
$Id: sbox.c,v 1.9 2000/03/28 20:12:40 lstein Exp $
------------------------------------------------------------
Hope this is in the right forum
--este
<INPUT TYPE="hidden" NAME="required" VALUE="email">
...but I don't see any input with a name="email" attribute.
I think you want this one...
<input name="textfield32" type="text" size="30" maxlength="40">
...to be their email address, so you should change the name to "email" instead of "textfield32". You should probably also make...
<input name="textfield5" type="text" size="30" maxlength="40">
...be name="realname" so FormMail knows it's not just an arbitrary field.
But that shouldn't have anything to do with the error message you are receiving...
Stat failed. /mnt/mss-1/vol4/web/e/es/est/www.my url name.com/cgi-bin/FormMail.cgi: No such file or directory
That sounds like one of two things:
1. You have the wrong shebang line in the FormMail script (the line at the very top that starts with #!). This has to be set to the location of Perl on the server. Usually it is /usr/bin/perl (or /usr/sbin/perl, or /usr/local/bin/perl), but it can be anywhere they want. Ask your host where they have Perl located if they haven't already told you and make sure the shebang line matches.
2. Your host has CGI misconfigured somehow...perhaps they have an incorrect ScriptAlias for /cgi-bin/ or an incorrect <Directory> directive for the real directory. Try going directly to www.my url name.com/cgi-bin/FormMail.cgi and see if you get the same error, then try just www.my url name.com/cgi-bin/. If you get the same error, or a 404 error, then most likely they have got a kink somewhere in their system.
Also, just as an aside, make sure you set the permissions on FormMail.cgi with your FTP client to 755 (owner/group/public read ¦ owner write ¦ owner/group/public execute).
Jordan
i was having the same problems
try this little bit:
i hope this helps...
to test this you must have a form that sends the email address data to a cgi script named yourscript.cgi
the form:
<html>
<head>
<title>sample email</title>
</head>
<body>
<p>sample email form</p>
<form method="POST" action="/cgi-bin/yourscript.cgi">
<p>
email address: <input type="text" name="email" size="20"></p>
<p><input type="submit" value="Submit" name="submit"><input type="reset" value="Reset" name="reset"></p>
</form>
</body>
</html>
the script: yourscript.cgi
#!/usr/bin/perl
# Change the path above to the path to Perl on your server
use CGI;
$q=new CGI;
# Get the value "email" from the form to store in variable $email
$email=$q->param("email");
# Path to mail software on server
$mailprog = '/usr/lib/sendmail -t';
# Open sendmail and write & send an e-mail
open(MAIL,"¦$mailprog");
print MAIL "To: $email\n";
print MAIL "From: your_email@yourdomain.com\n";
print MAIL "Subject: what ever you want\n\n";
print MAIL qq~
*from here*
this is the body of the email:
Email: $email
*to here put what ever you want*
~;
close(MAIL);
#!/usr/bin/perl
print "Content-Type: text/HTML\n\n";
print "Hello, World<p>\n";
print "$ENV{'SCRIPT_NAME'}\n";
Store that in a file called test.pl in your cgi-bin, and then point your url to your-domain.com/cgi-bin/test.pl
That way you can isolate whether the problem is related to your cgi set up vs the form mail script itself.
The first is this:
<INPUT TYPE="hidden" NAME="missing_fields_redirect" VALUE="www. URL.com/contact.html">
Make sure you change that to your ACTUAL domain.
The second related directly to the error:
Stat failed. /mnt/mss-1/vol4/web/e/es/est/www.my url name.com/cgi-bin/FormMail.cgi: No such file or directory
Either in your form or in your form handler, look for the line "www.my url name.com" and change it to your domain.
You have a hidden variable that needs to be set somewhere.
Even a crappy host can tell you that.
Pete
[edited by: jatar_k at 9:18 pm (utc) on Oct. 7, 2003]
[edit reason] no sigs thanks see TOS [webmasterworld.com] [/edit]