PDA

View Full Version : How to setup FormMail


petesmc
01-20-2001, 03:43 PM
Heres how to setup FormMail:

1. Create a form.

2. Specify the forms action to the location of formail:

<form action="/cgi-sys/FormMail.cgi" name="My Form">

3. Then specify the recipient After the form tag. This is not alway neccessary but sometimes is required:

<form action="/cgi-sys/FormMail.cgi" name="My Form">
<input type=hidden name="recipient" value="email@your.host.com">

4. Upload your page and view it in your browser.

To check out many other optional but useful FormMail values, check out the manual available in your account by using this link:

http://my_domain.com:2082/frontend/hrcp/formmail/index.html

Or by entering your control panel, and selecting 'FormMail'

Peter

smokke
01-24-2001, 06:07 PM
it´s working but returnlink doesn´t work.
and in recieved email just getting subject and env_report.
please help me.
<form action="http://imaginerias.com/cgi-sys/FormMail.cgi">
<input type=hidden name="recipient" value="felipe@imaginerias.com">
<dl>
<dt><i>Subject :
<dd><SELECT name="subject">
<OPTION>My suggestions
<OPTION>My comments
<OPTION>Send me info
<OPTION>Others
</SELECT>
<dt>Your Name :
<dd><input type=text name="realname" size=30>
<dt>Your Email Address :
<dd><input type=text name="email" size=30>
<dt>Your Phone :
<dd><input type=text name="phone" size=30> (not required)
<p>
<dt>Message :
<dt><TEXTAREA name="comments" cols=60 rows=10></textarea><p>
</dl></i>
<dt><input type=submit value="Send this"> <input type=reset value="Start Over"><p>

<input type=hidden name="required" value="email,realname">
<input type=hidden name="env_report" value="REMOTE_HOST,REMOTE_ADDR,
REMOTE_USER,HTTP_USER_AGENT">
<input type=hidden name="print_config" value="realname,email">
<input type=hidden name="sort" value="order:phone,comments">
<input type=hidden name="title" value="Thank You for Your Suggestion">
<input type=hidden name="bgcolor" value="#FFFFFF">
<input type=hidden name="text_color" value="#ffffff">
<input type=hidden name="link_color" value="#FF0000">
<input type=hidden name="vlink_color" value="#0000FF">
<input type=hidden name="return_link_url" value="http://www.imaginerias.com">
<input type=hidden name="return_link_title" value="Back to Your Site">
</form>

petesmc
01-24-2001, 06:36 PM
Isn;t it redirect instead of return link url?

jamesdasher
01-25-2001, 12:55 AM
Your problem is that you do not have parentheses around the input type for example:

you have:

<input type=hidden name="recipient" value="felipe@imaginerias.com">

you should have

<input type="hidden" name="recipient" value="felipe@imaginerias.com">

Hope that fixes it

smokke
01-25-2001, 02:02 PM
jamesdasher:
not working
something else???
pleaseeeee

petesmc
01-25-2001, 02:17 PM
Try placing it after the <form tag and use this format:

<input type=hidden name="return_link_url" value="http://your.host.com/index.html">

Make suire you use the index.html or your simular page..

Admiral V'Pier
01-26-2001, 12:37 AM
According to the FormMail if I fill a form, it should display in the order of the forum but instead it comes out in alphabetical order, and I don't have that feature on. I tried to tell it to sort but it does not, it just keeps displaying it in alphabetical order.

So what's up with FormMail?

petesmc
01-26-2001, 03:28 AM
maybe that is just a bug from matts sotware

Admiral V'Pier
01-26-2001, 03:59 AM
Well if it's a bug, then it's a pretty nasty bug then, and also inconvieniant. Gonna have to look for another formmail script that actually works properly.

The formmail script on the old HR server works fine, can you copy those files over to this system?

TB2000
01-28-2001, 08:33 PM
Hi There,

I'm in the middle of moving into Host Rocket and am creating a form. Thought I had it but....

Once I clicked send it told me "There are Missing Fields" First Name And Last Name..Huh? I filled in those fields.

It also said "Form Dump"

Can Anyone Make Sense of this and tell me what I may be doing wrong pleeeeeeaaaaase ô¿ô

Any help is appreciated,
Lori ( TB2000 )




Originally posted by petesmc
Heres how to setup FormMail:

1. Create a form.

2. Specify the forms action to the location of formail:

<form action="/cgi-sys/FormMail.cgi" name="My Form">

3. Then specify the recipient After the form tag. This is not alway neccessary but sometimes is required:

<form action="/cgi-sys/FormMail.cgi" name="My Form">
<input type=hidden name="recipient" value="email@your.host.com">

4. Upload your page and view it in your browser.

To check out many other optional but useful FormMail values, check out the manual available in your account by using this link:

http://my_domain.com:2082/frontend/hrcp/formmail/index.html

Or by entering your control panel, and selecting 'FormMail'

Peter

steffield
01-28-2001, 10:33 PM
I cannot get FormMail from Matt Wright to work properly either.

The sort feature is buggered.

HostRocket use that script don't they? Or at least the help file is the same.

Might experiment with a php script.


Ian Gunter

TB2000
01-28-2001, 11:14 PM
Yes from what I see that is the script they're using..I've been reading all night and I just don't get it.

I have another domain host (local) I use but their so basic that creating a form was as simple as 1..2..3 course I didn't have access to my own CGI-BIN either so using host rocket I will be learning many new things.

Hmmm...Php script..another new one for me ;o)

Well, I think I'll give up for the night...back to the drawing board first thing in the morning with a fresh mind.

If you happen to figure something out let me know ok!

Thanks

Lori ( TB2000 )

Originally posted by steffield
I cannot get FormMail from Matt Wright to work properly either.

The sort feature is buggered.

HostRocket use that script don't they? Or at least the help file is the same.

Might experiment with a php script.


Ian Gunter

steffield
01-28-2001, 11:21 PM
Well, I downloaded a php script from http://php.resourceindex.com but to no avail. I was getting 404 errors with it, and I was sure that you didn't need to worry about permissions when using php. I gave it a 755 perm and tried but then I encountered a 500 Server Error.

Sod It! It'll just have to be alphabetical, for the foreseeable future, at least.


Ian Gunter

Admiral V'Pier
01-29-2001, 12:40 AM
Please COPY the WORKING FormMail Script from your Alabanza servers to the new servers, your customers are stressing out over defective sort features.

Thank You

[Edited by Admiral V'Pier on 01-28-2001 at 11:47 PM]

steffield
01-29-2001, 01:54 AM
It's not the HostRocket script that is faulty, but the main one, that Matt is distributing.


Ian Gunter

TB2000
01-29-2001, 08:49 AM
I noticed that many of Matts scripts are dated back to 1996 and 1997 as copyright. It's no wonder their are bugs considering that scripts and codes are forever changing online. It's no doubt they probably need upgrading.

Anyway...Good Morning all! I'm awake and as soon as I take care of my business I'll be back at it to try and figire this out. If I get it working I will pass on what I know.

Lori ( TB2000 )

DCE
01-29-2001, 11:42 AM
one of the problems i had with 'FormMail' was it's intermittent acceptance of spaces
in some parts of the code they would be OK in others, forget it
ie

<input type="password" name="verifiedpassword">
worked OK

<input type="password" name="verified password">
Returned a 'missing fields error!!!

Hope this is of help to someone

TB2000
01-29-2001, 01:17 PM
YES!!!! I Did It...I got it working ;o)

DCE...I think my problem was something as basic as a space because I decided to re-type up my entire form very carefully and it did it..it took me right on to my thank you page.

Now I'm not sure what type of form you are all looking at having in your site BUT mine is just a basic form to get the visitors first and last name, and email address. Anyway as my gift to you all that need help I will copy and paste my form below as an example to create your own.

Hope this helps any and all!

************************************

<FORM METHOD="POST" ACTION="http://www.trafficblaster2000.com/cgi-sys/FormMail.cgi">

<INPUT TYPE="HIDDEN" NAME="RECIPIENT" VALUE="netstars@trafficblaster2000.com">

<INPUT TYPE="HIDDEN" NAME="SUBJECT" VALUE="Sign Me Up">

<INPUT TYPE="HIDDEN" NAME="REDIRECT" VALUE="http://www.trafficblaster2000.com/thanks.html">

<INPUT TYPE="HIDDEN" NAME="REQUIRED" VALUE="FIRSTNAME,LASTNAME,EMAIL">

<INPUT TYPE="HIDDEN" NAME="SORT" VALUE="ALPHABETIC">

<CENTER>
<H3>
<FONT COLOR="#000000">First Name:</FONT><BR>
<INPUT TYPE="TEXT" NAME="FIRSTNAME"></h3></CENTER>

<CENTER>
<H3>
<FONT COLOR="#000000">Last Name:</FONT><BR>
<INPUT TYPE="TEXT" NAME="LASTNAME"></h3></CENTER>

<CENTER>
<H3>
<FONT COLOR="#000000">Email Address:</FONT><BR>
<INPUT TYPE="TEXT" NAME="EMAIL"></h3></CENTER>

<BR><BR>

<INPUT TYPE="SUBMIT" VALUE="Submit">
<INPUT TYPE="RESET" VALUE="Reset">

</FORM>

**********************************

If your interested in seeing what type of form this gives you then you can check it out at...

http://www.trafficblaster2000.com/freesoftware.html

If you decide to test this form just add "Test" in the name field so I know it's anyone from HR

Thanks For All Your Support!

Lori (TB2000)

You got your site URL wrong, just changed it slightly

[Edited by petesmc on 01-29-2001 at 12:22 PM]

saintego
02-09-2001, 04:38 PM
I'm trying to set up formmail so that my visitors can send sections of my site to their friends via email. However, when I test it, I get:

"Sorry I can't send to domain.com. Is domain.com on this server ?"

Does anyone know of a workaround?

-Chad Kraeft
http://www.ivory-tower.net

steffield
02-09-2001, 08:50 PM
domain.com is your domain name. For instance Micro$oft would use microsoft.com and Yahoo would use yahoo.com

Change it to whatever the domain name of your account is (ivory-tower.net)???

saintego
02-10-2001, 01:28 AM
I'm not trying to send the formmail to myself. I'm setting it up so that visitors can email pages of my site to themselves or their friends.

http://www.ivory-tower.net if you're interested.

wmk86
03-24-2001, 04:29 PM
Originally posted by saintego
I'm trying to set up formmail so that my visitors can send sections of my site to their friends via email. However, when I test it, I get:

"Sorry I can't send to domain.com. Is domain.com on this server ?"

Does anyone know of a workaround?

-Chad Kraeft
http://www.ivory-tower.net
yeah i am getting the same thing, how can i send it to another email address (hotmail)?

saintego
03-26-2001, 12:47 PM
Well, I got it to email to a third party (as follows):

$recipient = trim($recipient);
$subject = trim($title);
$msg = "This message was sent by a friend who thought you might be interested.\n\n";
$Story .= $Story . $msg;
$sender = "From: Ivory Tower <info@ivory-tower.net>\n";
mail("$recipient","$subject","$Story","$sender");

My remaining problem is how to send it so that it shows up as HTML. I've tried:

$sender .= "Content-Type: text/html; charset=iso-8859-1\n"; // Mime type

But, there is a bunch of X-Antiabuse messages in the header that spaces any HTML too far to be recognized as such... Any ideas out there?

graham
03-29-2001, 06:41 PM
hostrocket doesn't allow you to use off-network addresses for formmail. This is to prevent abuse from the public so only HR users can use the formmail script located on their server.

saintego
03-30-2001, 04:12 PM
incorrect. it lets you email whomever you want. it just tags the x-antiabuse stuff on there if it's off-network. my problem is keeping the x-antiabuse headers IN the header and not bleeding into the text of the message.

graham
03-30-2001, 04:18 PM
not how it worked for me, but whatever. When i used an off-network address it wouldn't send the form and it said "is this address on the network" but when i changed it to my address on the network everythigng worked fine.

Fuser
04-04-2001, 12:33 AM
I am trying to configure my FormMail.... I have a cgi-bin, but no cgi-sys that I can get to through FTP =/

My understaning is that the file I need to modify is /cgi-sys/FormMail.cgi. It seems to be there, but I can not see it with my FTP program. (using DWeaver's ftp)

Thanks for any help =]

Harold Trull Jr
04-05-2001, 03:49 AM
Fuser, you do not have to configure the FormMail.cgi file. HostRocket staff has done the work so it runs on their servers. All you need to do is add
<FORM METHOD="POST" ACTION="http://www.yoursite.xxx/cgi-sys/FormMail.cgi">
to get formmail operational.

Harold Trull Jr
04-05-2001, 03:56 AM
I am getting a form dump for missing fields instead of being sent to my error page. The code I used is:
<INPUT TYPE="HIDDEN" NAME="missing_fields_redirect" VALUE="http://www.nesids.org/error1.htm">
This appears to match the syntax I found through the control panel. Any suggestions?

Fuser
04-05-2001, 03:22 PM
That explains that then. Thanks Harold =]

BUT something else must be messed up. I get this when trying to submit my test (http://fuse9.com/formtest2.htm):::

<<<
There are missing fields
recipient is missing

Form Dump:
company: fused
email: lskdj@sdlkj.com
name: chris
question: something
required:
submit: Submit
>>>

note: "There are missing fields","recipient is missing", and "required:"

Anybody know what could be causing this?

**UPDATE**

I left out my invisible "recipient" field that directs the email to the proper err... recipient.

Thanks goes to John at HR Support for fixing the problem that was totally my fault =P

kylecool
04-08-2001, 05:03 PM
my formmail seems to be fine, but I am on host.hrwebservices.net

Harold Trull Jr
04-17-2001, 03:10 PM
1. Can anyone tell me what version of FormMail is being used?
2. Has ANYONE been able to get the 'missing fields redirect' working?
3. Has ANYONE been able to get the sort feature to sort other than alphabetic?
4. Can support please advise what is being done to correct these problems and satisfy HostRockets customers?
Thanks, Harold

Fuser
04-17-2001, 04:04 PM
Sorry, Harold. I can't answer any of these =[
BUT- There is another solution for #2 that I actually like better. Using Dreamweaver I added a "behavior" to my send button that verifies fields that I specify according to parameters that I control. Rather than being redirected to an error page- a dialogue box pops up telling them that a field is required.

This may not work for what you are trying to do, but I thought I would mention it.

If you are interested, go to http://fuse9.com/html - then contact. If you leave out your name or do not put in a valid looking email, you will get the error message. Feel free to test it.

Good Luck =]

fade
04-21-2001, 11:57 PM
I've tried setting this script up and after pulling my hair for a while, I finally go it to work....sort of.

I just have a basic form, and when I hit "submit", it takes me to my thankyou page. I get an email from it, but there's NOTHING in the email. It's just blank.

What's the cause of this? Anyone else have this problem while setting up FormMail? It's probably something really stupid that I'm not seeing but I'm stumped.

Here's what I have (of course it's modified):

-------
<form method="post" action="/cgi-sys/FormMail.cgi" name="Signup">
<input type="HIDDEN" name="RECIPIENT" value="me@mysite.com">
<input type="HIDDEN" name="SUBJECT" value="SignUp">
<input type="HIDDEN" name="REDIRECT" value="http://www.mysite.com/formthanks.htm">
<input type="HIDDEN" name="REQUIRED" value="name,email,homepage">
<input type="HIDDEN" name="MISSING_FIELDS_REDIRECT" value="http://www.mysite.com/formerror.htm">
<input type="HIDDEN" name="SORT" value="order:name,email,homepage">
-------------

petesmc
04-22-2001, 12:01 AM
Can I recommend downloading the script yourself from

www.worldwidemart.com/scripts/

And install it and see it you can get it to work?!?!?

fade
04-22-2001, 12:22 AM
Sure, but how do I set it up on my site? It's so much easier just editing HTML and letting Host Rocket take care of the rest.

petesmc
04-22-2001, 12:27 AM
You just uload into the cgi-bin directory

kylecool
04-22-2001, 12:29 AM
Originally posted by petesmc
You just uload into the cgi-bin directory


Upload it in ASCII and chmod it properly..

KYLE

fade
04-22-2001, 01:40 AM
I uploaded the FormMail.pl file to my cgi-bin and CHMOD it 777. Or should it be 755? I'm not sure of these things.

What else am I supposed to do? After uploading the file, I tried my form again and got the same result: form thank you page, and an email with nothing in it.

????

petesmc
04-22-2001, 07:55 AM
Did you change the action of the form to /cgi-bin/FormMail.pl or .cgi

fade
04-22-2001, 11:01 AM
I changed the form action to /cgi-bin/FormMail.pl AND .cgi but I get an error page on both, saying I can't access that directory or something.

When I leave it at /cgi-sys/FormMail.cgi, I guess that's the HostRocket setup, which hasn't been working for me in the first place.

But it's still the same thing.

What should I CHMOD the FormMail.pl file to? And what should I put in the form action?

Odium
04-22-2001, 12:10 PM
Here's a great PHP form processing script....needs a little configuration, but nothing hard. It formats submitted information anyway you like, and it will email you the info according to a template you can set up yourself....

http://www.heyes-computing.net/download.php?script_id=6

If you don't want to mess with the HR script.

Harold Trull Jr
04-25-2001, 05:05 PM
Fade, if the code snippet you posted is your entire form code then the problem is simple. You have to have input fields with the names you specify, either using the defaults (such as email) or providing text or textarea inputs.
Hope this helps... Harold

offloe
05-25-2001, 11:50 PM
What should the permissions be set up as? Any specific number?

danbond
06-15-2001, 04:28 AM
Hi, I am trying to set up a my own fommail.pl in my cgi bin following the path specified by host rocket:

http://universalsource.co.uk/home/univers/public_html/cgi-bin/formmail.pl

But I get 404 errors?

I have modified the form script to my domain/I.P and the path to perl is correct:

$mailprog = '/usr/sbin/sendmail';

@referers = ('universalsource.co.uk','66.78.8.166');

Any Ideas?

Cheers

Dan

http://universalsource.co.uk

danbond
06-22-2001, 10:02 AM
if you are setting up formmail in your own cgi bin the you have to chmod 755 it

And the path is the straightforward: cgi-bin/formmail.pl

havent got a clue what the hostrocket cgi-bin path addresses are about

sarahm
06-28-2001, 03:04 PM
I'd like to upload a simple php mail form script that appears simple but capable of handling my needs. How do I create the correct path?
Sarah

angel leeroy
06-28-2001, 05:50 PM
I get the page showing my info has been sent but never recieve an email.

Did host-rocket forget to install the website info after the crash in the form-mail script?

jp

danbond
06-28-2001, 07:14 PM
I have set up formmail in both my own cgi bin and with their cgi-sys/FormMail.cgi script without any successs seems that send mail is yet to be configured right...

is delaying the return of my site by a lot

sarahm
06-28-2001, 09:44 PM
The form mail program that I'm trying to install is from heyes Computing
http://www.heyes-computing.net/scripts/6/ I tried loading the config file to the cgi bin, but that doesn't seem to work. If anybody else is using his program successfully, could you please advise me. I'm at a dead end.
Sarah

danbond
06-29-2001, 07:44 AM
Have you tried changing the chmod settings to chmod 755?

if that doesn't work I would use formmail.pl instead and do the same as my previous posts.

If you are on host 14 it won't work till 2moro as sendmail is out

sarahm
06-29-2001, 11:32 AM
Ok, I created a folder in the cgi bin called form_mail But it should be formmail.pl or formmail 755 ? I'm lost. What about the config file? Does that go into the cgi bin? I AM on server 14 but suspect the problems are due to me not understanding the format.
Sarah

Madolyn
06-30-2001, 01:48 AM
Admittedly I haven't read all the posts in this thread but I've seen the likes of it before.

If formmail sorts alphabetically by default and does not recognise the sort function (and/or print_config) it is not the "original" Matt Wright script but a clone. I have had extensive experience with formmail clones and I recognise the signs. Trust me. :)

I run a hosting domain that uses a formmail clone which I strongly suspect to be the same one used here. The fixes I advise for my hostees on that domain are as follows:

1. prefix each prompt with a numeric or alphanumeric sorter, eg <input type="text" name="01_homepage"> <input type="text" name="02_email"> <input type="radio" name="03_joinlist" value="yes"> <input type="radio" name="03_joinlist" value="no"> and so on. This will return the fields in the desired order.

2. to have the sender's name and email address returned in the form (what print_config is supposed to do if you give it the input names), call the name field something other than "realname", eg <input type="text" name="01_visitor"> and have them enter their email address twice (the clone does not send mail if there is no sender address): <input type="text" name="email"> <input type="text" name="02_email">, or else set the name="email" as a hidden field and use your own address as the value, and prompt the sender for their address using a name= that isn't the same as "email".

gecko
07-12-2001, 04:11 AM
when i set this up it work fine but now i cant find the reason why it doesnt send email...

please help..

coda
_____________________________________________

<form method="POST" action="http://www.balanghai.com/cgi-bin/formail/formail.pl">
<input TYPE="hidden" NAME="redirect" VALUE="http://www.balanghai.com/campusradio/thankyou.html">
<input TYPE="hidden" NAME="env_report" VALUE="REMOTE_HOST,REMOTE_ADDR,REMOTE_USER,HTTP_USER_AGENT">
<input TYPE="hidden" NAME="recipient" VALUE="campusradio@balanghai.com">
<input TYPE="hidden" NAME="subject" VALUE="Campus Interactive">
<p class="bold">*Name &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="text" name="name">
</p>
<p class="bold">*Email &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="text" name="email">
</p>
<p class="bold">*Location &nbsp;&nbsp;&nbsp;&nbsp;
<input type="text" name="location">
</p>
<p class="bold">Action:
<select name="action">
<option> - Select - </option>
<option>Vote</option>
<option>Request</option>
<option>Message</option>
</select>
</p>
<p class="bold">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
to the show
<select name="features">
<option> - Select - </option>
<option>Rainbow Countdown</option>
<option>The Rock</option>
<option>On-Line</option>
<option>Overdrive</option>
<option>Radio Talk</option>
<option>Total Recall</option>
</select>
</p>
<p class="bold">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
to DJ
<select name="select">
<option> - Select - </option>
<option>Jude</option>
<option>Arvin</option>
<option>Mike</option>
<option>Boy</option>
<option>Eugene</option>
<option>Rhoda T.</option>
<option>Jonnie</option>
</select>
</p>
<p class="bold">*Type Message Below</p>
<p>
<textarea name="comments" cols="40" rows="6"></textarea>
</p>
<p>
<input type=hidden name="required" value="name,email,location,comments">
<input type=hidden name="missing_fields_redirect" value="http://www.balanghai.com/campusradio/error.html">
<input type="submit" name="Submit" value="Submit">
<input type="reset" name="Submit2" value="Reset">
</p>
</form>

sccr410
07-17-2001, 07:28 PM
I got it to work perfectly for my site, hooray! Thing is, I can't stand the page it goes to when a field is left empty. Is there any way to have it go to a page I specify?

4SeeN
07-21-2001, 09:45 PM
I'm i the only one that noticed the instructions in the hostrocket control panel doesn't work. Like this:


<FORM METHOD="POST" ACTION="/cgi-sys/FormMail.cgi">

<INPUT TYPE="HIDDEN" NAME="RECIPIENT" VALUE="dsadsa@sdads.com">


To my understanding people been gettin it to work using thigs like that above.

But did anyone notice that if u use the control panel instruction.... you form might come out to something like:

<FORM METHOD="POST" ACTION="/cgi-sys/FormMail.pl">


< TYPE="HIDDEN" NAME="RECIPIENT" VALUE="dsadsa@sdads.com">


Notice how now its FormMail.pl instead of .cgi...... And the word "input" before type is missing. which causes the form to not work and fields to be invisble.

I tried using the instructions,,,, and i even emailed support for help...and using all their suggestions and everything. I still can't get it to work.


Try this form:
http://infinitestylez.com/400.shtml

After u submit the page.....look at the addressbar...on the page that comes up.

4SeeN
07-21-2001, 10:11 PM
I might be alittle.. wrong or totally wrong....So if i am...i'll admit it. But could someone please give me advise or help me make a form. I could be missing the smallest thing....or i could just be doing the whole thing wrong.

I'm not naming the support names but was some of the help they gave me.

<FORM METHOD=\"post\" ACTION=\"/cgi-sys/formmail.pl\" NAME=\"form_name_here\">

Please change \"form_name_here\" to the name of your form. See if this works for you.


-- But that didn't work so then they told me this:

Try removing the \\ marks in the form tags.


- That kinda work so i sent them this:-----------------


I think i found a flaw in the syntax for FormMail.pl

This is just one of the syntax in the instructions found in the controlpanel.

< type=text name="realname">

That syntax is suppose to allow users to enter their name. But do you see the space between the "<" and "type" ?? Well that causes the syntax to appear on a webpage as text, and not invisible.

So i tried this to see if it solves the problem:

<type=text name"realname">

Now this fixed the problem,,,,but the only thing was there was no form for a user to enter his name. So now the syntax wasn't visible on the webpage, the way it's suppose to be. But how could someone enter his/her "realname" if there isn't an area to insert text.

So then i tried this:

<input type=text name="realname">

Now this totally fixed the problem. It now allows a text area in the form, for the user to enter his/her "realname". The only problem is all the syntaxes found in the FormMail.pl instructions on the controlpanel.....have this problem. "I was just letting you know, in case you didn't know, and maybe you could fix the flaw in the instructions." Because it was really a pain in the a.. to solve on my own.

- Now i have another problem...one of tech support told me to start off my form like this:

<FORM METHOD=\\\"post\\\" ACTION=\\\"/cgi-sys/formmail.pl\\\"
NAME=\\\"form_name_here\\\">

So i used that and did a test....But got a 404 error page. and in the address bar was this link:

http://infinitestylez.com/"/cgi-sys/formmail.pl/"?realname=dsfdsf&email=sdfsdf&S1=sdfsdef&B1=Submit&recipient=webmaster@infinitestylez.com&redirect=http%3A%2F%2Fwww.infinitestylez.com&subject=400+Error

Now do you notice the /"/ in http://infinitestylez.com/"/cgi-sys/formmail.pl/

the form is pointing to /"/cgi-sys/formmail.pl/"

- I figured this must be wrong so then i inserted:

<FORM METHOD="post" ACTION="/cgi-sys/formmail.pl"
NAME="form_name_here">

So now in the address bar on the 404 page this link shows up:

http://infinitestylez.com/cgi-sys/formmail.pl?realname=dfg&email=fdgdgfdg&S1=dfgfdgfd&B1=Submit&recipient=webmaster@infinitestylez.com&redirect=http%3A%2F%2Fwww.infinitestylez.com&subject=400+Error

- So now the form points to:

http://infinitestylez.com/cgi-sys/formmail.pl?

-where before it was it had two quotes that had showed up in the link.


- But then i noticed that in the formmail instructions is says use GET or POST, in capital letters. So i capitilized POST...but the form still don't work.

So instead of using:

<FORM METHOD=\\\"post\\\" ACTION=\\\"/cgi-sys/formmail.pl\\\"
NAME=\\\"form_name_here\\\">

Which tech support gave me.....i used:

<FORM METHOD="POST" ACTION="/cgi-sys/formmail.pl"
NAME="form_name_here">

Which seems to work better, and the all the syntaxs need to be:

<input type= fdgssvzxcvcxz....
not < type= dsfasfadsfas... <<<they way it says in the instructions.

I'm sorry for writing so much...but i wanted to let you know more about my problem, and what i was doing....that way maybe it could help you, help me better.

Thank you.



And they told me to ask people on forums....so this is what i'm doing :)

Thanks for all you help......even though i know its probably real easy to use FormMail.......I just can't do it :(

nodntap
08-10-2001, 05:18 PM
You folks seem to have a real problem with one of the easiest, and best, form scripts around. I don't know how hostrocket configures the script for you and don't really care as it's easy enough to do yourself.

Setting Up FormMail: Part #1

Step #1:
Use your 'My Computer' application (or Windows Explorer, assuming you are using Windows) to set up a folder on you C: drive (or your My Documents folder) and call the folder ~cgi-bin~. This folder will be used to store the .zip file and the files extracted when you unzip the file. Leave your My Computer application open and minimize it because you will need it later. This ~cgi-bin folder~ should also mirror your ~cgi-bin directory~ on your web site.

Note:
Folder = computer
Directory = web site


Step #2:
Download the FormMail.zip file (you will see several file download options but go ahead and download the .zip file to make it easier on you) from Matt Wrights site.

A new upgrade just came out: Version 1.9 -- August 3, 2001 so this answers someone's question about the scripts being old. But it was still a good script and has changed very little even with the new upgrade.

http://www.worldwidemart.com/scripts/FormMail.shtml

You will have to go through a 'Download Options fill out form' but it's easy enough to do and you can just go with the defaults and enter your name and email address toward the bottom.

Then click the ~Download Selected File~ button at the bottom of the page. Save the .zip file to the 'cgi-bin' folder you created in Step #1. It takes all of 2 seconds to download the file.

Step #3:
When it's done click Open and your default zip/unzip program should automatically come up with the 2 files that come with FormMail. One is a Readme (text) file and the other is the actual Perl script called FormMail.pl.

If you need a zip/unzip program download the free evaluation version of WinZip 8.0 here:

http://www.winzip.com/


Step #4:
Extract the files to the folder you created above, i.e. extract them to the 'cgi-bin' folder on your computer. A new folder inside the cgi-bin folder will automatically be created and it will be called FormMail.

Step #5:
Using your 'My Computer' application open the cgi-bin folder, then open the FormMail folder.

You should see the two files Readme and FormMail.pl inside this folder. ~Right click~ on the Readme text document and select Open with..

When the 'Open With Dialog Window' appears select Wordpad at the bottom of the list of selections. Do NOT use Notepad because you will end up with a mess on your hands. If for some reason you don't see Wordpad then you can use WinWord (MS Word), or any other application that handles text files (other than Notepad).

Step #6:
Print out the Readme text file. You should end up with approx. 11 printed pages. This document explains the different hidden form elements you can use. It also explains how to configure the FormMail.pl script which I will try to explain below.

Set aside the print out for now and get back into your 'My Computer' program.

Step #7:
~Right Click~ on the FormMail.pl file and open it the same way you did the Readme file. You will see what looks like a bunch of gibberish but don't let it worry you.

The very first line looks like this:
#!/usr/bin/perl

This is the path to Perl on your Host and should be right for hostrocket folks. You may also see this line written like so:

#!/usr/local/bin/perl

If you are using a different Host other than hostrocket check with your Host to see which line they use. It's can usually be found on their web site somewhere.


Now find the following line: (Find the line by paging down once, it should be right near the top.)

$mailprog = '/usr/lib/sendmail';

Change this line to:

$mailprog = '/usr/sbin/sendmail';

This is the sendmail location on hostrocket. Again, if you are using a different Host check with them to see what they want you use for the sendmail path.


Next, find this line: (It's a few lines down from the line above).

@referers = ('worldwidemart.com','206.31.72.203');


The @referers tells the script what sites (domains) can access and use the script. All you need to do is to change the information to your own site(s). For instance, my site is called www.nodntap.com and the distinct IP address is 216.74.99.64, so I would change the line to:

@referers = ('www.nodntap.com','nodntap.com','216.74.99.64');

Why the two (2) nodntap entries? Because I'm a little anal and want to make sure the script picks up on my site. You can also use a site outside of hostrocket to access the FormMail.pl script by just adding more referers. The first two (2) are enough, you don't really need the IP. At least I have never needed it. Go ahead and put it in if you know it. If not you can usually get it from your FTP program when uploading files. It will be in the message window of your FTP program. See FTP section below.

@referers = ('www.nodntap.com','nodntap.com','216.74.99.64','www.nodntap.f2s.com', 'nodntap.hypermart.net', and so on');

A few more lines down you should see this puppy:

@recipients = @referers;

This is now the most important variable in the FormMail script. It's an array (list) of all the valid email recipients that can be used in the HTML form you create.

So if I'm going to be the only recipient in the hidden recipient form field I would change the line like so:

@recipients = '^nodntap@rglobal.net';

Say I have a co-moderator named Mary Jane Stokes and want her to receive all the emails from the form as well. I would need to add her email to the above line.

@recipients = '^nodntap@rglobal.net', '^maryjanes@hotmail.com';

Note the ^ symbol before each email address. But chances are the only @recipient email address you will need to add is your own. When you write the hidden form element it MUST match this email address exactly.

Example:
<input type="hidden" name="recipient" value="nodntap@rglobal.net">

See the Readme text file for more information.

Going down a few more lines you will see:

@valid_ENV = ('REMOTE_HOST','REMOTE_ADDR','REMOTE_USER','HTTP_USER_AGENT');

This allows you to list the environment variables that a you may request to be added into the e-mail that's sent to you. For now you need to go ahead and add another variable just in case you need it. The HTTP_REFERER tells you what URL the form was submitted from (in case you have forms on different domains and want to know what domain they came from).

Change above line to:
@valid_ENV = ('REMOTE_HOST','REMOTE_ADDR','REMOTE_USER',
'HTTP_USER_AGENT','HTTP_REFERER');

These go along with the env_report hidden input element in your HTML form.

Example:
<input type="hidden" name="env_report" value="REMOTE_HOST,HTTP_USER_AGENT,HTTP_REFERER">

Would give you the remote host, the browser used, and the URL where the form was submitted in the email you receive (I believe it might also appear on the conformation page? I'm old and forgetful!).


Your FormMail.pl script should now be configured.

Save/ReSave the FormMail.pl script to the 'FormMail folder' with the changes. Note: if you print out the FormMail.pl script you will end up with about 15 pages of print.

Step #8:
Using your FTP program upload the FormMail.pl script to your web site and stick in your ~cgi-bin directory~. Once it's uploaded right click on it and find the chmod selection (if using WS FTP LE), or change attributes, or whatever it's called in the FTP program you are using.

Set the chmod permissions for the FormMail.pl script to either 755 (preferred) or 777. If you are using the WS FTP LE application just check all nine (9) boxes for 777, or check all the 'Read' and 'Execute' boxes and the 'Write' box under 'Owner' for 755.

If you don't have an FTP program download WS FTP LE here: (it's free)

http://www.zdnet.com/downloads/stories/info/0,,35156,.html

Use Fetch (15 day free demo), or something similar if you are using a Mac. Maybe someone knows of one for free for the Mac?

http://download.cnet.com/downloads/0-10207-100-5797024.html?tag=st.dl.10005-103-1.lst-7-1.5797024

Now all you have to do is to write the form itself which a lot of folks also have a tough time with.

In Part #2 I will try to run down the form elements for you.

Don S.
{ http://groups.yahoo.com/group/HTML_Learning_Corner }
The HTML Learning Corner Web Site
{ www.nodntap.com/programs/start.html }

Mr.G
08-11-2001, 12:26 PM
Has there been a change at HR?
I have been using "Form mail" for over a year and it was working fine. Now it no longer sends me a completed form.
Before I start looking for a issue at my end has HR changed something in its send mail feature?
Thanks,
Ed

nodntap
08-12-2001, 10:27 PM
FormMail Part #2

Step #1
First you need to set up a form. The one I created is called do_form1.shtml and can be found at the following URL. Make sure you have the Readme text file you should have printed out handy so you can reference it.

www.nodntap.com/misc/do_form1.shtml


Step #2
These are the two lines I will be discussing/dissecting.

Opening <form> tag:
<form name="myform1" method="POST" action="http://www.your_site.com (or .net, or whatever)/cgi-bin/FormMail.pl">

Hidden input element:
<input type="hidden" name="recipient" value="recipients_email_address(s)">

Where you see this line:
<!-- WE WILL ADD MORE HIDDEN INPUT ELEMENTS HERE -->
Is where I/we will be updating the HTML document and adding more hidden input elements.


Step #3
First up is the opening <form> tag:

<form name="myform1" method="POST" action="http://www.your_site.com (or .net, or whatever)/cgi-bin/FormMail.pl">


<form method=" "> attribute. ( method="POST" )

Make the method=" " attribute value ~POST~ and make sure you capitalize the word POST because Perl seems to do better if you do (maybe it's CGI, I forget). You can of course use the ~GET~ method for a form but .. DON'T. Just take my word for it. The GET method is more for sending information in a link that is passed via (by way of) the address line in your browser.

Example:
To get Donster's name and location click
<a href="http:/www.nodntap.com/cgi-bin/FormMail.pl?name=Don&location=California">
<b>here</b></a>!

Note the data we are sending at the end of the link address:
?name=Don&location=California

Perl has it's own special way of parsing the GET method, as it does with the POST method. GET is used a lot in Search Engines. But enough about GET as you will probably never use it. The POST method is the one we want.

<form name=" "> attribute. ( name="myform1" )

Name your form in case you end up needing to use a little Javascript with it. The name of your form is up to you. If you have more than 1 form on a page make sure they have different names.

<form action=" "> attribute.

(action="http://www.your_site.com (or .net, or whatever)/cgi-bin/FormMail.pl")

We have to tell the form where to go to get parsed (deciphered/broken down/figured out) so we have to send it to our Perl script called FormMail.pl.

How do we do that? With the action=" " attribute/value. We need to tell our browsers where the script is located so it can access the correct Host and path (address) on the internet in order to find the script and to parse it, or at least try to if there are no errors or empty fields in the form (assuming we set up the form/script to detect empty fields).

In the above coding I have used an absolute address as the action=" " value to send our form goodies to but you could have just as easily used a relative path.


Absolute Addressing

The absolute URL path is the whole path to the Perl script (or any other file for that matter).

http:// = hypertext transfer protocol
www. = world wide web
nodntap.com/ = your web site (domain) name.
cgi-bin/ = directory where your Perl scripts are located.
FormMail.pl = the file you want. In this case a Perl script.

Example:
action="http://www.your_site.com (or .net, or whatever)/cgi-bin/FormMail.pl"

Or using me as an example:
action="http://www.nodntap.com/cgi-bin/FormMail.pl"


Relative Addressing

But this is lots of typing and for us lazy folks there is a shortcut way of doing it called relative addressing! Say you save the above HTML form document in your base directory. For instance:

http://www.nodntap.com/do_form1.html

You type in the address (or use Favorites or Bookmarks) and up pops your form page. Well ... our good old browsers will remember this address so there is actually no need to add it to our action=" " attribute unless the Perl script resides on a different web site. Say everything is on the same web site. In that case all we need to do is to tell the browser what directory to look in for our Perl script and what script (the name of the script/file) we want to use.

Relative address (assuming the HTML form document is in the base directory on your web site):

action="cgi-bin/FormMail.pl"

Your browser will supply the first part, the:
http://www.nodntap.com/

Now lets say you are like me and don't like cluttering the base directory on your web site and put 99% of your files in a directory called programs to keep the base directory cleaned up. The HTML form at the top, which I call do_form1.shtml will be stored there too. In that case we need to 'back out' of this directory (called going up a level) so we can access our cgi-bin directory. This is easy also. Just add ../ for each directory you want to 'back out' of.

The do_form.shtml document is located at:

http://www.nodntap.com/do_form1.html/programs/

So to get to out FormMail.pl script from here we need to go up (or back, depending on how you look at it) one level, and then access our cgi-bin directory.

action="../cgi-bin/FormMail.pl"

That should get you up and running on the <form> line of the code.


Step 4
Hidden input elements.

First off you will never see a hidden input element, or at least you shouldn't. The hidden input elements are there to pass information to the Perl script and are ~NOT~ part of the form you will see on a web page.

Here is a break down of the attributes normally used in a hidden input element.

<input type="hidden" name=" " value=" ">

In the FormMail.pl script only one hidden element is absolutely necessary and that's the one named ~recipient~. Let's take a look at the one in the code above.

<input type="hidden" name="recipient"
value="recipients_email_address(s)">

Recall that in Part #1 I told you that the:

@recipients = variable (list)

had to match this hidden input ~value~ EXACTLY. So .. all you need to do is add the email recipients you inputed in the Perl script (@recipients) to the hidden recipient element in your HTML document. (Be aware that there are other ways to do this but this is the most secure way.)

Here is the @recipients line from the Perl script:
@recipients = '^nodntap@rglobal.net';

Trimming the fat we come up with the email address:

nodntap@rglobal.net

In other words ... me, (or YOU when you change the recipient and @recipients to your own email address).

Check our recipients hidden form element again in the HTML document above.

<input type="hidden" name="recipient"
value="recipients_email_address(s)">

We need to change the value=" " attribute to match that of @recipients in the Perl script.

<input type="hidden" name="recipient"
value="nodntap@rglobal.net">

To go a little further lets say we want the form email stuff to go to another person as well. Say you are running a Fantasy Writing game with two story lines. I'm the Game Master and run one story line, while Mary Jane Stokes is the Game Master of the other and runs the other story line.

You want to join the game and click on the Join link which takes you to the form page that has the form at the beginning of this post. I want both Mary, and myself to receive your email reply so I have to do two things.

Set the @recipients in the Perl script to include Mary's email.

In FormMail.pl script:

@recipients = '^nodntap@rglobal.net','^maryjanes@hotmail.com';

And add her to the hidden recipient input element in my HTML form document above called do_form1.shtml.

In do_form.shtml document:

<input type="hidden" name="recipient"
value="nodntap@rglobal.net,maryjanes@hotmail.com">

If you need to add other recipients to receive the form email, first add their email address to the @recipients variable in the Perl script. Then add them to the hidden recipient form element and separate the emails addresses with a comma ( , ).


Step 5
Make sure you RE-SAVE both the script and the HTML form if you change them and make sure to UPLOAD the new versions to your site.

I can't tell you how many times newbies complain to me about their stuff not working properly because the Perl script is no good when the problem 99 times out of 100 is because they forgot to do something simple like upload the revised versions of their files.

Note #1
When you need to re-upload a Perl script you do NOT have to reset the permission on it. The permission should stay the same for you but if things just aren't going right you might just want to use your FTP program and reset the FormMail.pl script permission to 755 anyway (see Part #1 about setting permissions).

Note #2
I used my misc directory and not my programs directory, I also used my hotmail account as the recipient, and I called FormMail.pl = formmail2.pl.

Note #3
Take my advise and rename the FormMail.pl to formmail.pl and use all lower case letters. Your browser and Host will thank you for it. Also don't use spaces in your filenames but you can use the underslash ( _ ).

Next Time:
Next time I will break down more of the hidden input elements and hopefully things will go a little faster now that we have the form set-up and the initial stuff out of the way.

You can view these tutorials (in a more complete form) here:
http://www.nodntap.com/programs/formmail_1.shtml

Don S.
{ http://groups.yahoo.com/group/HTML_Learning_Corner }
The HTML Learning Corner Web Site
{ www.nodntap.com/programs/start.html }

tim
08-23-2001, 05:52 PM
Finally....
After a whole day of trying, replacing,changing and crying I got my FormMail to work.. (still can't get it to sort) But now a question...

How can I disable the enter key?

If I press it while entering data into any field it will submit the form.

Also want to say THANX! I have read every message in this thread a few times and because of all the input, My forms work....

goodlife
08-25-2001, 09:56 AM
I am new on this server and this community, and had also problems with the formmail script.

I found the latest version, (version 1.9) of the FormMail script available for download on the site of Matt Wright.

It is new since: August 3, 2001.

I've installed it in my cgi-bin and made the form and everything looks OK.

url: http://www.worldwidemart.com/scripts/formmail.shtml


Hope this helps,

Franky

mcg13
12-13-2001, 02:52 AM
I hate to complain... especially when I have to go out of my way to do it, but it has to be said that the free, "pre-fab" FormMail script provided by HostRocket is incredibly weak and lame. I don't think they could actually provide less useful information and/or documentation if they wanted to be vague and confusing on purpose. I've been messing with web design, HTML and CGIs for many, many years and this script and its presentation as a "resource" to customers is just bad, bad, bad.

In addition to hosting two (new) sites at HostRocket, I also host a few sites with Verio and their pre-fab scripts, especially the FormMail script is incredibly easy to use. They present you with a form, you supply the field names and check which ones are required. You hit "submit" and you're done. It spits out the form and the script actually works!

I'm kinda wishing HostRocket would exert a little more effort in providing useful pre-fab scripts like FormMail. File all that in the Suggestion Box if you care...

-M

Chameleon
12-15-2001, 11:56 AM
FormMail works fine for me. The only problem I'm having is that the missing fields redirect thing won't work.

~Chameleon

rt4christ
04-06-2002, 05:12 PM
Hi!

This info may be helpful to those who were asking about the results not being sent the way they were entered on the form. You can specify the order of the data using the Sort variable. Here's what mine looks like:

<input type="hidden" name="sort" value="firstname,lastname,wedding,attending,redirect">



Hope this helps.



Ron