I have been tearing my hair out all afternoon trying to create a very simple form. I am using sitespinner and have used the formmail wizzard on bt but it isn't working.
On site spinner I have used the form editor tab to input:
URL (Action) /cgi-bin/formmail
Encoding: text/plain
method: post
Hidden values:
recipient - franharris@ladyadventurer.co.uk
email - postmaster@ladyadventurer.co.uk
redirect - www.ladyadventurer.co.uk
It has generated the following:
<form id="OSubscribe" name="Subscribe" action="/cgi-bin/formmail" method="POST" enctype="text/plain">
<input type="hidden" name="recipient" value="franharris@ladyadventurer.co.uk">
<input type="hidden" name="email" value="postmaster@ladyadventurer.co.uk">
<input type="hidden" name="redirect" value="www.ladyadventurer.co.uk">
<input type="text" id="Oobj444" name="Name" value="Name" style="position:absolute;z-index:12;font-family:'Papyrus';font-size:16px;left:169px;top:244px;width:300px;height:25px;">
<input type="text" id="Oobj204" name="Emailaddress" value="Email address" style="position:absolute;z-index:13;font-family:'Papyrus';font-size:16px;left:558px;top:239px;width:301px;height:25px;">
<input type="submit" id="Oobj200" name="Submit" value="Submit" style="position:absolute;z-index:14;font-family:'Papyrus';font-size:16px;left:964px;top:240px;width:100px;height:25px;">
</form>
When I test it, it says that it can't find cgi-bin/formmail
Help!!!
Solved! Go to Solution.
I'm not sure about running php through cgi bin, so I can't say what you might be doing wrong with this. The simplest way I've found is to install the matt wright plug in script under "plug in scripts" in site builders on the control panel. That will put a file in cgi-bin called simply formail which is actually a perl script that reads #!/usr/bin/perl, this works with the standard formmail script also included in the control panel.
Hope this helps
Hi there,
You need to put the formmail script in the cgi bin folder. Formmail is not something BT includes as standard.
Have a look here for instructions on uploading manually.
Thanks
Thank you so much, I'll give it a try.
F
Hello, I'm still doing something wrong as it still says that the formmail can not be found. I have:
A file uploaded and stored at cgi-bin/formmail.php which reads:
<?
$ForwardTo="franharris@ladyadventurer.co.uk";
$email=$_REQUEST['Name'];
$entry=$_REQUEST['Email'];
mail($ForwardTo, "Competition Entry", $entry, "From: $email");
header("Location: index.html");
?>
A file at private/formmail.conf which reads:
referers=ladyadventurer.co.uk
Details in Sitespinner, Form Editor:
Action: /cgi-bin/formmail
Encoding: application/x-www-form-urlencoded
Method: Post
Hidden Values:
Recipient: franharris@ladyadventurer.co.uk
Email: postmaster@ladyadventurer.co.uk
Redirect: index.html
The code produced in site spinner is:
<form id="OSubscribe" name="Subscribe" action="/cgi-bin/formmail" method="POST" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="recipient" value="franharris@ladyadventurer.co.uk">
<input type="hidden" name="email" value="postmaster@ladyadventurer.co.uk">
<input type="hidden" name="redirect" value="www.ladyadventurer.co.uk">
<input type="text" id="Oobj444" name="Name" value="Name" style="position:absolute;z-index:12;font-family:'Papyrus';font-size:16px;left:136px;top:239px;width:300px;height:25px;">
<input type="text" id="Oobj204" name="Email" value="Email address" style="position:absolute;z-index:13;font-family:'Papyrus';font-size:16px;left:558px;top:239px;width:301px;height:25px;">
<input type="submit" id="Oobj200" name="Submit" value="Submit" style="position:absolute;z-index:14;font-family:'Papyrus';font-size:16px;left:964px;top:240px;width:100px;height:25px;">
</form>
Please could you give me some more guidance?
Many thanks,
Francesca
I'm not sure about running php through cgi bin, so I can't say what you might be doing wrong with this. The simplest way I've found is to install the matt wright plug in script under "plug in scripts" in site builders on the control panel. That will put a file in cgi-bin called simply formail which is actually a perl script that reads #!/usr/bin/perl, this works with the standard formmail script also included in the control panel.
Hope this helps
Thank you very much, I'll give the plug in script another try tomorrow.
Francesca
Hi,
I have started from the beginning again, installed the matt wright plug in script and tested. Unfortunately it still says that /cgi-bin/formmail can not be found. When I looked in filezilla, I could see the formmail folder but when I clicked on it it said
550 /cgi-bin/formmail: No such file or directory.
Could this be part of the problem?
Many thanks,
Fran
As an exciting update, with the solution that I tried above - I am now getting emails but from a user end (once they have input there details on the website) it still says that the page (www.ladyadventurer.co.uk/cgi-bin/formmail) can not be found. Any ideas?
Many thanks,
Francesca
I'm getting a different error from the site you mentioned, but that might be something you're working on now, I'm getting:
The requested URL /cgi-bin/www.ladyadventurer.co.uk was not found on this server.
As far as the error that filezilla is giving you that is actually normal, filezilla reads anything without an extension as a folder and the formmail that gets installed by BT is either a symlink or a perl script ( I haven't logged into SSH to check for sure) so that should be fine. Double check the formmail file in your cgi-bin, it should have "#!/usr/bin/perl" and the matt wright copyright notice surrounded by #'s. If it's anything else you might want to backup and delete it and try to reinstall formmail
Hi,
Thanks for all of your help - yes, I was changing something else when you tested.
I have deleted the formmail and reinstalled. It now has the code that you mentioned, the copyright wording but then lines and lines of code. Is this right? The page is still saying that ladyadventurer.co.uk/cgi-bin/formmail can not be found.
Fran