Forum Moderators: phranque

Message Too Old, No Replies

php Form to EMail Problem

... can anyone advise?

         

austtr

12:21 am on Jun 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm using a formmail.php script downloaded from the web.

It recommends setting a referrer variable to be the domain and IP address where the form is running... done that.

I've tested the form and it works fine... for me. But other users of the form are seeing a failure and the error message says the sender is not from a registered domain.

Email and scripts are not my strong point. Can anyone enlighted me on what is happening?

MWpro

12:28 am on Jun 1, 2003 (gmt 0)

10+ Year Member



I'm guessing that the script is checking the domain and ip address of your site and if the site that is calling the .php file does not match, it won't get sent.

Since I'm assuming that everything is on your domain, I would recommend taking the ip address part off and just using the domain name as protection for this. Try that and post what happens.

austtr

2:35 am on Jun 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



MWpro....

Thanks for the tip. I removed the IP address from the referrer variable... still did not work.

So I removed the domain name as well, leaving the variable empty. The form then worked OK.

I am still none the wiser as to what's going on, because as I understand it, the referrer variable is supposed to be important for defining where the form can run from..... but it seems as if it will only run properly without the variable!

I now recall why I decided against trying my hand at programming.