formMail.pl Form Submission Help

Hi!

ok, i need to create a form for my web site, and 1&1 says I need to use formMail.pl to do so. However, I use Frontpage 2003, and have no idea on how to send my forms to my e-mail. I can get the form designed (using simple HTML) but then what do i need to do to set up this formMail thing to send the form to my email?

I have downloaded the FormMail Compact from <http://nms-cgi.sourceforge.net/scripts.shtml> but I still am un able to figure out where I'm supposed to put the file, or how to set it up, or whatever I need to do. A detailed Explenation would be excellent, if possible!

Thank you so much for your help!

Bick
bick2000Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
calamasterConnect With a Mentor Commented:
The above comments are valid but don't really help a 'Newbie' on Forms and FormMail.pl. There are a number of versions out there and the one that your Host allows you to use needs to be looked at.
There are a number of Parameters that FormMail.pl looks for in you HTML Form. These need values setting in your HTML code or taken from what a user types in.
Here is a simple form
_____________________________________________________________________________
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Enquiry form</title>
</head>
<body>
<TABLE BORDER="0" WIDTH="400" CELLSPACING="0" CELLPADDING="0">
<tr>
<td>
<form name="detailsForm" method="post" action="http://www.yourwebsite.com/cgi-bin/FormMail.pl">
<input type="HIDDEN" name="subject" value="Form Submission">
<input type="HIDDEN" name="email" value="Website Forms">
<input type="HIDDEN" name="realname" value="Website Forms">
<input type="HIDDEN" name="print_blank_fields" value="yes">
<input type="HIDDEN" name="recipient" value="enquiries@yourwebsite.com">
<input type="hidden" name="redirect" value="http://www.yourwebsite.com/forms/enquiry_thankyou.html">
<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#EDEDED">
<tr>
<td bgcolor="#999999" colspan="2">Enquiry form</td>
</tr>
<tr>
<td align="right">Title</td>
<td>
<select name="Title">
<option value="">Please select</option>
<option value="Mr">Mr.</option>
<option value="Miss">Miss</option>
<option value="Mrs">Mrs.</option>
<option value="Ms">Ms.</option>
<option value="Other">--Other--</option>
</select>
</td>
</tr>
<tr>
<td align="right">Other</td>
<td><input type="text" name="Other title" value="" size="29"></td>
</tr>
<tr>
<td align="right">First name</td>
<td><input type="text" name="First_Name" value="" size="29"></td>
</tr>
<tr>
<td align="right">Surname</td>
<td><input type="text" name="Surname" value="" size="29"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><INPUT TYPE="submit"> <INPUT TYPE=reset></td>
</tr></table></form></body>
__________________________________________________________________________
Note the 'Hidden' field values at the top of the form. You can get the Exact parameter names from the FormMail.pl
The important ones are 'recipient' (who gets the form) & 'redirect' (where to take browser after form has been submitted.
You may be able to edit the FormMail.pl (if your Host will let you) to ONLY allow the Form to be submitted to specified addresses.
SPammers will get your address from the 'Recipient' field, but at least this will get you started on how HTML Forms work.

Hope this helps
0
 
venkateshwarrCommented:
keep the script on the server and post the form elements to the script.
what kind of server are u using?
0
 
bick2000Author Commented:
My web host is 1&1.com

What should i ask them, as far as the settings for the formMail file?

What do you mean about posting the form elements to the script. How do i set that up in the HTML... sorry for so many questions, I am just so new to all of this.

Also, what changes do i need to make to the FormMail script?

Thanks you.
0
Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

 
venkateshwarrCommented:
I am not familiar with formMail, but based on the extension, I am assuming it is a perl script.
So your webhost must support scripts using perl.

You can ask them about this..

Regarding formmail, I found this link.. It will give you more details.
http://www.scriptarchive.com/formmail.html
0
 
sarahkCommented:
formMail is targetted by spammers because it requires the destination email to be stored in a hidden variable. This allows them to get your email and sell it to all and sundry. They use automated "robots" to do this and scan millions of sites so don't think they won't stumble upon yours.

It is widely recommended that formMail should not be used. Not good news for newbies unfortunately because it forces you into server side programming. A simple contact form is not difficult however. I would recommend using PHP rather than Perl (but I'm biased). Let me know your preferred language and I can point you to some good examples.
0
 
ilovemykeykiCommented:
I would recommend you to use the supported and enhanced FormMail.pl
It is also based on Matt's FormMail program, but these people called "The London Perl Mongers" were able to enhance the script including protecting your email address from spammers. The script is available at this URL. FAQ and Support are also available here. I just started using this script 2 weeks ago.

http://nms-cgi.sourceforge.net/
0
 
bick2000Author Commented:
Great, thank you so much for your help calamaster, and everyone else. Right now, i just want to get it to work, then i will test out different scripts, but thank you for your input.

Ok, I got the file from my host and put it in a folder called cgi-bin, and copied this code. The for itself works great, and the submit button launched the FormMail.pl script. However, I am immedialty stoped with at "Error 500". I'm assuming, therefore, that it is a problem with the script. I ran 1&1's "Perl Script Checker" and got this response:

- cgi: File not executable (use chmod +x)
(no output)

I don't know where i need to go from here. I have set all the changes my host has said to the script, is there anything i need to review again? and what is "chmod" for?

THanks so much for all your help on this pesky problem.

Bick
0
 
bick2000Author Commented:
BTW, as far as HTML, thats exactly what i was looking for calamaster, thanks!
0
 
bick2000Author Commented:
i also ran 1&1's CGI Output Monitor, and it gave me this error:

- 126 CGI returned nonzero status
/usr/bin/nice: /kunden/homepages/28/d92615737/htdocs/./cgi-bin/FormMail.pl: Permission denied
STDOUT OK STDERR OK

Thank you for your help!
0
 
calamasterCommented:
The problem is that the Host has not set the 'permissions' on the cgi-bin.FormMail.pl for you to use it yet.
Normally, th HOST pops it into either YOUR cgi-bin folder or somewhere else that you can't see.

Contact 1&1 and ask them:
1. have you put the FormMail.pl in the right place
2. have they set 'Permissions' on it (CHMOD 777 I think)

0
 
calamasterCommented:
Further to last reply. I see that 1&1 are a eShop hoster that give you a load of configuration options for you website.

From: www.1and1.co.uk homepage
got to FAQ (top right)
then ADVANCED SCRIPTING FUNCTIONS
then CGI OPTIONS
then 'How do I create a Feedback form using the standard CGIs'

Here there is a tutorial on how to configure a FORM on your webspace in your eShop.

OK

0
 
bick2000Author Commented:
Ok, ill ask them, but they take a while to respond to my e-mail! :)

Yeah, i tried using one of their forms, but hated it, because i need something just a little more custom.

What do I have to do about "Permissions"? or will they tell me that?

Thanks!
0
 
bick2000Author Commented:
Will this help my problem at all? and what do i change?       

[Why aren't the scripts in /cgi-bin not working?

The standard configuration redirects the cgi-bin directory on every customer home directory to /var/www/cgi-bin. For this reason the webserver can't find the scripts in the cgi-bin directory of your customer home directory. You can solve this problem either by renaming the directory or by deactivating the redirection in the apache configuration /etc/httpd/conf/httpd.conf as follows:

# ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" ]

Thanks!
0
 
bick2000Author Commented:
Sorry for posting again, but I found this, and it has to do with setting permissions, but its greek to me... is this something that I can change? (or need to?)

Thank you!

Please note: Perl scripts can only be executed if .pl is the file extension and the first line of the script starts with #! /usr/bin/perl.

Perl scripts must be transferred in ASCII mode and the file permissions must be set as follows:
Owner: Read, Write, Execute
Group: -
Other: Read, Execute
(chmod 705)

"Normal" web page file permissions should be chmod 604.
Owner: Read, Write,
Group: -
Other: Read
0
 
calamasterCommented:
It looks like the cgi-bin folder is in the root Host 'Home directory' tree and you do not have a different one for each of the eShops they host. I assume 1&1 therefore share infrastructure across all their hosted eShops??  I don't know how 1&1 set up the sub-shops within their hosting environment, ask them.

So this means that it is NOT at www.yourshop.com/cgi-bin.

So I think you need to set the Action of the web Form as follows:

<form name="detailsForm" method="post" action="../var/www/cgi-bin/FormMail.pl">

Now I am not 100% sure of this but I think you get the general Idea. You need to send the above line to 1&1 to chck just what the path is.

I see that 1&1 sub eShops have URLS http:\\www.oneandone.co.uk\yourshop.com

If the above is true then the 'Permissions' will have already been set for you to use. (CHMOD 705)

I'll have another look through 1and1 but as I am not a customer I get limited viewing of their set up.


0
 
calamasterCommented:
Further to the above:
I have found a configuration script on 1and1 FAQ for the FormMail.pl

From: www.1and1.co.uk homepage
got to FAQ (top right)
then ADVANCED SCRIPTING FUNCTIONS
then FORMMAIL.PL
then Look through all these solutions. One has a completed configuration.

All you do is change your version as specified and load it up....To where is not very clear though, so check with 1and1.

When you load it up via FTP make sure use set the 'Permission' correctly in your FTP program as specified.

If you get an error when you try to fire it up then check the error message. Most errors are caused by incorrect 'Hidden' field names or configuration entries. These ARE case sensitive.
0
 
calamasterCommented:
One more thing though. You said earlier that you used one of their custom forms already

>>Yeah, i tried using one of their forms, but hated it, because i need something just a little more custom.<<

Why not just edit the HTML in the one you created to add more / less fields as required?

<tr>
<td align="right">Mother's Maiden Name</td>
<td><input type="text" name="motherName" value="" size="29"></td>
</tr>

<tr>
<td align="right">Favourite Colour</td>
<td>
<select name="FavColour">
<option value="">Please select</option>
<option value="BL">Blue</option>
<option value="GRN">Green</option>
<option value="RD">Red</option>
<option value="OR">Orange</option>
<option value="Other">--Other--</option>
</select>
</td>
</tr>
0
 
bick2000Author Commented:
Ok, thank you so much! You've helped me enough that I should stop taking your time and just give you the points! :)

Thanks again! I'll talk to 1&1 and get the rest worked out!

Thanks,

Bick
0
 
calamasterCommented:
Thanks for the points.
Hope you get it sorted.

Calamaster
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.