I have a flash site (http://www.myscreenenclosure.com/) that sends email
using a php script.
The contact page worked great until my webhost moved me to another server.
Anyone know why this mail script now fails? Here it is...
Sorry, but I'm not a php guru like you all.... Thanks....
<?
$adminaddress = "feedback@mysite.com";
$siteaddress ="http://www.MyScreenEnclosure.com";
$sitename = "Atlantic Aluminum And Screen";
//No need to change anything below ...
// 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);
// ORIGINAL
// else $ip = getHostByAddr($REMOTE_ADDR);
// Gets the POST Headers - the Flash variables
$action = $HTTP_POST_VARS['action'] ;
$name = $HTTP_POST_VARS['name'] ;
$email = $HTTP_POST_VARS['email'] ;
$phone = $HTTP_POST_VARS['phone'] ;
$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","Info Request",
"A visitor at $sitename has left the following information\n
Name: $name
Email: $email
Phone: $phone
The visitor commented:
$comments
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 with you shortly.\n
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;
} //
?>