I have this script that i have been working with for a year or so on a unix server. it works great. I recently changes from using a unix server to a linux server. they are both using php5 but the problem is that the linux server will not send mail. below is the script. is anyone familar with this problem(going from unix to linux)? do i need to modify the script for a linux server for it to work?
This script works with a flash form. the flash form has 3 fields. name, email, comments + a submit button. once pressed it goes to this script.
<?
$adminaddress = "info@domain.com";
$siteaddress ="http://www.domain.com";
$sitename = "domain";
// Gets the date and time from your server
$date = date("m/d/Y H:i:s");
// Gets the IP Address
if ($REMOTE_ADDR == "") $ip = "no ip";
else $ip = getHostByAddr($REMOTE_ADDR);
// Gets the POST Headers - the Flash variables
$action = $HTTP_POST_VARS['action'] ;
$email = $HTTP_POST_VARS['email'] ;
$name = $HTTP_POST_VARS['name'] ;
$comments = $HTTP_POST_VARS['comments'] ;
//Process the form data!
// and send the information collected in the Flash form to Your nominated email address
if ($action == "send") {
//
mail ("$adminaddress","A message from domain.com",
"A visitor at $sitename has left the following information\n
Name: $name
Email: $email\n
The visitor commented:
------------------------------
$comments
Logged Info :
------------------------------
Using: $HTTP_USER_AGENT
Hostname: $ip
IP address: $REMOTE_ADDR
Date/Time: $date","FROM:$adminaddress" ) ;
//This sends a confirmation to your visitor
mail ("$email","Thank You for visiting $sitename",
"Hi $name,\n
Thank you for your interest in $sitename!\n
We will get back to you as soon as possible.
Thank You,
$sitename
$siteaddress","FROM:$adminaddress") ;
//Confirmation is sent back to the Flash form that the process is complete
$sendresult = "Thank you. You will receive a confirmation email shortly.";
$send_answer = "answer=";
$send_answer .= rawurlencode($sendresult);
echo $send_answer;
}
?>
Im a little confused as to what to do to make this work on the linux system. Any help would be much appreciated.