PDA

View Full Version : Problem w/ FormMail


dgessler
01-19-2001, 01:58 PM
How come the following does not work:

<form name="form1" method="post" action="cgi-sys/FormMail.pl">
<type=hidden name="recipient" value="dan@lumpymilk.com">
<type=hidden name="redirect" value="http://www.lumpymilk.com/">
<input type="text" name="textfield">
<input type="submit" name="Submit" value="Submit">
</form>

I used dreamweaver to make it, can someone please help me?


EDIT: ah, i didnt know html was enabled.....
can someone please check out http://lumpymilk.com/form.txt and see the form setup and tell me whats wrong, thanks

[Edited by dgessler on 01-19-2001 at 01:09 PM]

MilkMan
01-19-2001, 02:34 PM
for the part for the "cgi-sys/FormMail.pl" try putting in the entire http://www.lumpymilk.com/cgi-sys/FormMail.pl part.

Also, I've found that sendmail functions on the new server maynot be working correctly as a script I used succesfully on the old Alabanza server no longer works on the new server. Well, it executes but no mail is ever received.

pestilence
01-19-2001, 02:41 PM
i personally use bnbmail for mailing from my forms easy to setup and it works a treat has all the features of formail and a couple of extras,just ul to your own cgi bin and away ya go

petesmc
01-19-2001, 03:05 PM
I personally just wrote a tiny PHP script that send me mail:

Check it out at

http://www.codingclick.com and
http://www.codingclick.com/feedback.php

Peter

dgessler
01-19-2001, 03:32 PM
I personally dont know why this wont work. I think im progressing though, when i try to submit my form it says

There are missing fields
recipient is missing

Form Dump:
redirect: http://www.lumpymilk.com/
required:
submit: Submit
textfield: test
to: dan@lumpymilk.com

whats that mean?

petesmc
01-19-2001, 03:40 PM
It means that it cannot find the recipient. Sometimes FormMail is fuss y and requires data in a specific way:


[br]
[type=hidden name="recipient" value="dan@lumpymilk.com"]
[br]
[type=hidden name="redirect" value="http://www.lumpymilk.com/"]
[br]
[input type="text" name="textfield"]
[br]
[input type="submit" name="Submit" value="Submit"]
[br]


make the top like the following:

[form name="form1" method="post" action="cgi-sys/FormMail.pl"]
[type=hidden name="recipient" value="dan@lumpymilk.com"]

I put the weird bracket because HTML is on and i tried turning it off but is doesn't work


[Edited by petesmc on 01-19-2001 at 02:44 PM]

dgessler
01-19-2001, 03:50 PM
ok thanks everyone, i finally gto it working!

petesmc
01-19-2001, 03:54 PM
Could you tell us what the problem was?

That way anyone reading this thread at a later date can quickly find an answer..

peter

dgessler
01-19-2001, 03:57 PM
im not even too sure wht the problem was..... but now its working (http://www.lumpymilk.com/form.html)

petesmc
01-19-2001, 04:02 PM
I am guessing it is either because:

you added a '/' before cgi-sys or because of my suggestion,
the hidden input: recipient wasn't the next thing after the form tag....

thanx

dgessler
01-19-2001, 04:05 PM
i think it was the second one, recipent wasnt after the form tag, btw, I talked to the guy on AIM and he said its suppose to be /cgi-sys/FormMail.pl, but i guess you can do it either way

JordanTLClive
01-19-2001, 08:46 PM
the directory path makes a difference depending on where the current page is stored. If you put cgi-sys/formmail.pl it will go to the cgi-sys subfolder of the current folder. If you put /cgi-sys/formmail.pl it will go to that folder in relation to the domain. Here are examples to explain it better

cgi-sys/formmail.pl
When called from http://yoursite.com/index.htm you would get
http://yoursite/cgi-sys/formmail.pl
When called from http://yoursite.com/subfolder/index.htm you would get
http://yoursite.com/subfolder/cgi-sys/formmail.pl
This would cause formmail not to work because obviously cgi-sys is not in that location...

/cgi-sys/formmail.pl
When called from http://yoursite.com/index.htm you would get
http://yoursite/cgi-sys/formmail.pl
When called from http://yoursite.com/subfolder/index.htm you would still get
http://yoursite.com/cgi-sys/formmail.pl
Thus no matter what directory your file is in, if you put /cgi-sys/formmail.pl in, it will work. The first / says that the following is relative to the domain.

So basically, cgi-sys/formmail.pl will work as long as your in the document root (public_html, but not a subfolder of public_html), and /cgi-sys/formmail.pl will work no matter where you place the file.

dgessler
01-19-2001, 09:19 PM
Thanks!

keepsake
01-20-2001, 01:53 AM
UGH! I have read through all of the postings I could find on Form Mail and I can't get it to work. It was working before I switched hosts so I know at one point and time it was right. Now all I get is a "NOT FOUND" page. I have tried every suggestion on this page from adding my web address to switching around the Method and the Action. I've even tried small case letters of formmail.pl to large case letters such as FormMail.pl. HELP! What am I doing wrong? If someone could help me my web address is http://www.keepsaketreasures.com/contact.htm

Thanks!
Sheila

Brendan
01-20-2001, 02:05 AM
/cgi-sys/FormMail.cgi

-Brendan

keepsake
01-20-2001, 03:48 AM
Thanks Brendan! the .cgi worked =)

petesmc
01-20-2001, 05:58 AM
Firstly, i would like to say you have the WERIDEST HTML in there.

Eg, you insert this </head> then a few more lines after you made links, you have META tags and you close </head> again and then you CLOSE </html>

HUH?

Anyway, you didn't do what i said, make sure the recipient is after the form tag. Not after anything else.

Also you have a full URL: use /cgi-sys/FormMail.pl

Peter