I'm Lost...almost there, but a little lost

I'm getting two different type of err msgs, depending if I have 'CHECK_REFERER' as TRUE or FALSE. Neither seems to work for me.

Below is the code when it's set to TRUE
***********************************

define('VERSION','Classic v1.07.1');
define('MANUAL','http://www.boaddrink.com/projects/phpformmail/readme.php');
define('CHECK_REFERER', true);

$referers = array('milupana.com', '69.20.55.34');

$valid_env = array('REMOTE_HOST', 'REMOTE_ADDR', 'REMOTE_USER', 'HTTP_USER_AGENT');

$recipient_array = array('xxx' => 'xxx@milupana.com');

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

Below is the err msg when it's set to TRUE
***********************************

You are coming from an unauthorized domain.

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

Below is the code when it's set to FALSE
***********************************

define('VERSION','Classic v1.07.1');
define('MANUAL','http://www.boaddrink.com/projects/phpformmail/readme.php');
define('CHECK_REFERER', false);

$referers = array('milupana.com', '69.20.55.34');

$valid_env = array('REMOTE_HOST', 'REMOTE_ADDR', 'REMOTE_USER', 'HTTP_USER_AGENT');

$recipient_array = array('xxx' => 'xxx@milupana.com');

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

Below is the err msg when it's set to FALSE
***********************************

Notice: Undefined index: mail_newline in D:\inetpub\WWW\milupana.com\pages\formmail.php on line 365

Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in D:\inetpub\WWW\milupana.com\pages\formmail.php on line 433
The following errors were found:

* Message could not be sent due to an error while trying to send the mail.

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

I've tried different variations of the $referers = array (domain name and IP address), but to no avail.

Please advice.

Thanks in advance for your time and consideration.

By InterTechSol on

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I'm Lost...almost there, but a little lost

try changing this

$referers = array('milupana.com', '69.20.55.34');

to this

$referers = array('milupana.com','www.milupana.com', '69.20.55.34');

As to your error with mail(). This is a problem with the configuration of the mail server in the php.ini. You'll need to speak to your server admin and have them modify the php.ini file.

-Andrew Riley

I'm Lost...almost there, but a little lost

Andrew, thanks for your quick response to my issue. As an FYI, the customer is rebuilding their mail server, and once it's done, I'll test it out w/your suggestions. I'll post the results.

I'm Lost...almost there, but a little lost

Andrew, sorry it took me a while to post the results, but I've been very busy, and I just now remembered. Anyhow, the client made the changes to their mail server, and now all is well. Thanks for your input!

Stalk me!

Recommended Reading