PDA

View Full Version : FORMMAIL will not send results to me


alinkscom
03-06-2003, 02:24 PM
Someone who knows how scripts work on here please check out http://www.cheaphomecomputers.com/form-mail.htm

This is just a test page to get forms working. I have edited my FormMail.cgi script as specified in the Control panel directions and uploaded the original FormMail.pl file to my cgi-bin then changed it to FormMail.cgi. When I test it, it processes and redirects but I do not receive the results to my intended e-mail. Please help!

Thanks

don5408
03-06-2003, 03:41 PM
"When I test it, it processes and redirects but I do not receive the results to my intended e-mail."

Hi. First of all are you saying that you don't get *any* email at all at the forms@cheaphomecomputers.com address as a result of submitting the form? While there are a number of problems with your form and as a result the emailed output is incomplete when I upload your page as is to my webspace changing ONLY the recipient email address upon testing I did get the following email at the specified address:

------------------------------------
From: www@host32.hrwebservices.net
To: me@mydomain.com
Date: 3/6/03 1:47:00 PM
Subject: No subject given

name: John Dough
emailaddy: me@mydomain.net
address: 123 Main Street
city: Anytown
state: KA
zipcode: 00000
phone: 000-000-0000
fax: 000-000-0000
-------------------------------------

Suggestions:

- If you didn't get ANY email at all as a result of your attempt to test your form I'd start by sending yourself a test email at the forms@cheaphomecomputers.com address directly from your email client to see if you get it. Note that in some cases there may be a slight delay in the delivery of even local email so if you don't see anything give it awhile and check back.

- As far as much of the output of your form (year, make, model, mileage etc) not making it into the email the problem is with the SORT value and it seems to be related to your use of upper and lower case in naming your values. I found that by changing all of the values such as "Vehiclemake" to all lower case ("vehiclemake") in both your individual select tags and in the sort tag everything made it through OK (and in the appropriate order) in the next test email.

I'm not exactly sure *why* the upper case characters were an issue (one would think that as long as the values in the sort tag matched the actual values case-wize it would work) however the bottom line is that if you use the following sort tag and use all lower case characters in the value names in the rest of the form you should get the desired results.

<input type="hidden" name="sort" value="order:name,emailaddy,address,city,state,zipcode,phone,
fax,vehicletype,year,vehiclemake,vehiclemodel,maxmileage,
purchasetime,equipment,trade">

PS: As far as this:

"I have edited my FormMail.cgi script as specified in the Control panel directions and uploaded the original FormMail.pl file to my cgi-bin"

...note that your form is using the Formmail script which HostRocket has uploaded to the server-wide cgi-sys folder and NOT a script stored locally on your account. By calling /cgi-sys/FormMail.pl (or /cgi-sys/FormMail.cgi) in your form and using HR's preloaded script you avoid any need to modify or upload any files to your account.

If you wish to upload and use your own local formmail script you CAN (I'm hard pressed to think of any benefit to doing so, unless you are modifying the actual formmail script above and beyond setting the standard variables the result will be identical) however you would have to call your script instead of HR's in your form.

Example:

<form method="POST" ACTION="/cgi-bin/FormMail.cgi">
instead of
<form method="POST" ACTION="/cgi-sys/FormMail.cgi">

The first example would call a script named FormMail.cgi located in the cgi-bin directory under public_html while the second (which you are currently using) calls HR's copy of the script in the global cgi-sys directory. Also be aware that there's no need for the extra step of renaming the formmail file, FormMail.pl is just as good as FormMail.cgi.

Best o' luck!
Don

MarkHutch
03-07-2003, 07:18 PM
Looks like they got it fixed.