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.
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