PDA

View Full Version : ugh, can't get formmail to work...


thebishop
12-09-2002, 03:50 PM
mine doesn't seem to work either, even though i have done all the tips in the others (CHMOD 777, uploaded as ASCII, changed the PL file to .CGI and also modified the 3 lines in that script ...


here is my form i'm trying to get to work:

http://www.the82ndrangers.com/enlist1.htm

will attach the PL file as well, just in case.

thebishop
12-09-2002, 03:56 PM
guess i can't post it. lovely. i can set it up for download though, right here:

Grab my CGI File here... (http://216.127.78.93/files/FormMail.zip)

thebishop
12-09-2002, 07:45 PM
anyone know the answer to this?

don5408
12-09-2002, 07:48 PM
"Grab my CGI File here..."

Hi. From what I can see your form tags appear to be configured properly so the problem would likely be with the script itself. FYI the link doesn't seem to work. Note that if you prefer to upload it here while the board wont permit you to attach a .cgi or .pl file you should be able to upload a .zip file containing the script.

Don

thebishop
12-09-2002, 08:10 PM
coolness. thanks.

here is that file, zipped....

don5408
12-10-2002, 06:46 AM
"here is that file, zipped..."

OK, well after taking a look at and testing the script without finding any obvious problems I took a second (and closer) look at your form and spotted a problem there...you don't have a valid recipient tag, rather you have a "to" tag.

Try changing this:

<!-- Submissions are emailed to: -->
<INPUT TYPE="hidden" NAME="to" VALUE="thebishop@the82ndrangers.com">

...to this:

<!-- Submissions are emailed to: -->
<INPUT TYPE="hidden" NAME="recipient" VALUE="thebishop@the82ndrangers.com">

You didn't mention exactly how your form was failing however if the problem was a "Bad/No Recipient" error (which is what I got when I tested the combo of your script and your form changing only the referrers variable in the script and the email addy in the form) that change should help. If you have any further problems post back with details on what exactly is happening after you click Submit.

Best o' luck!
Don

thebishop
12-11-2002, 04:38 AM
ok now i have the enlist.htm on my main page working.... the redirect works fine, etc, but now the mail isn't delivered .... i go to my /mail/ folder and its just sitting in a file called inbox .... what gives?

I'm enclosing the cgi file again, with the top info that i use right now, etc...

thebishop
12-11-2002, 04:39 AM
here is the enlist.htm that i am currently using as well...

don5408
12-11-2002, 05:14 AM
"ok now i have the enlist.htm on my main page working.... the redirect works fine, etc, but now the mail isn't delivered .... i go to my /mail/ folder and its just sitting in a file called inbox .... what gives?"

hummmm...have you checked to make sure that you are currently receiving email sent directly (i.e. not via the form) at the enlist@the82ndrangers.com addy? I just sent you an email as a test, let me know if you get it or not.

The script and form you are using at this point *should* work (they're working for me with no modifications other than the referrers and recipients variables in the script and the email addy in the form), if you aren't receiving the output via email and the enlist@ address is confirmed to be working I'd submit a trouble ticket and have HR eyeball the problem.

Best o' luck!
Don

thebishop
12-11-2002, 02:57 PM
well, i don't actually HAVE an enlist mailbox, i have it alias to me .... can i do that, or does the sendmail function need an "actual" mailbox to process the mail that comes in for a certain account?

don5408
12-11-2002, 03:22 PM
"well, i don't actually HAVE an enlist mailbox, i have it alias to me .... can i do that"

Sure...it shouldn't matter whether enlist@the82ndrangers.com is an actual email account or an alias/forward (at least not as long as the alias is forwarding to another @the82ndrangers.com address, it's usually best to avoid using an off-network addy for formmail submissions), if you haven't already done so just test to confirm that email sent to that address by methods other than the form are getting through OK (I had sent you a test email via a Hotmail account, did you get that?)

Don

thebishop
12-11-2002, 03:29 PM
yes, i got the email you sent to enlist@the82ndrangers.com... it forwards to thebishop@the82ndrangers.com ...

but, that's all i've gotten ... nothing from the form at all...

this file i am attaching is the one that was in the /mail folder on my site ...

thebishop
12-12-2002, 08:08 PM
i THINK the problem had to do with the fact that i had two email domains for mine... once i pointed that out to the tech support, they did something and it fixed it, which rules.


on a seperate note, when I get the email, it won't show who its from, is that a tag I need to look at or something within the CGI? Right now it just says from () (like its an empty field...)

don5408
12-13-2002, 03:00 AM
"i THINK the problem had to do with the fact that i had two email domains for mine... once i pointed that out to the tech support, they did something and it fixed it, which rules."

Excellent, happy to hear of the good outcome!

"on a seperate note, when I get the email, it won't show who its from, is that a tag I need to look at or something within the CGI? Right now it just says from () (like its an empty field...)"

Yes, I noticed that in my testing. I was going to bring that up however as I saw that as an unrelated side issue I didn't want to confuse matters by making suggestions which wouldn't effect the issue at hand at that point.

The problem there is within your form (enlist.htm) itself...just as you didn't originally have a recipient field (you had a field named "to") you don't have an email field. If memory serves you originally had a field named "from" or "from1", while you made a step in the right direction by changing that to "email address:" note that FormMail looks for an "email" value to insert as the "From:" return address in the email, it has to be named *exactly* "email" and nothing else.

Suggestions:

- Change <INPUT TYPE="text" NAME="email address:" SIZE="30"> to <INPUT TYPE="text" NAME="email" SIZE="30">, that should take care of the From: () issue

- If you also want the user's name to appear in the From: field...ex: "From: somebody@someisp.com (John Smith)"...also change the line <INPUT TYPE="text" NAME="full name:" SIZE="30"> to <INPUT TYPE="text" NAME="realname" SIZE="30">

- While it's optional as you mention that "All fields must be completed any blanks will delay processing of your application" you may want to require that the necessary fields be filled out
(and in particular confirm that a properly formatted email addy has been included) by adding a "required" field such as this: <type="hidden" name="required" value="email,realname,gamename,age">

- As far as more general suggestions (a) for the best results avoid spaces when naming fields you plan on making required (ex: "gamename" instead of "Game Name") and (b) note that it's not necessary to add a : at the end of a field, FormMail will add one automatically in the emailed output (ex: with a field named "Favorite Weapon:" you'll end up with "Favorite Weapon::" in your email).

Best o' luck!
Don

thebishop
12-14-2002, 05:02 AM
Thanks Don. I did all of those, and made ICQ/MSN a required field as well.

don5408
12-15-2002, 04:25 AM
"Thanks Don. I did all of those, and made ICQ/MSN a required field as well."

You're welcome. Glad everything worked out, good luck with it!

Don