Hi There,
Any help would be really appriciated.
I have been using a mailform with my flash site for a while (PHP 4.4.1) , but now when I try the same mailform on another server running PHP 5, It wont send the emails !
do I need to update the code to allow this to run on PHP 5?
Here is the php mailform code:
<?
$adminaddress = "steve@digimodus.com";
$siteaddress ="http://www.mountstar.com";
$sitename = "Mountstar";
//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);
// Gets the POST Headers - the Flash variables
$action = $HTTP_POST_VARS['action'] ;
$email = $HTTP_POST_VARS['email'] ;
$name = $HTTP_POST_VARS['name'] ;
$company_name = $HTTP_POST_VARS['company_name'] ;
$telephone = $HTTP_POST_VARS['telephone'] ;
$comments = $HTTP_POST_VARS['comments'] ;
$dropdown = $HTTP_POST_VARS['hear'] ;
//Process the form data!
// and send the information collected in the Flash form to Your nominated email address
if ($action == "send") {
//SEND 1st MAIL TO ADMIN
mail ("steve@digimodus.com","Brookside/About page enquiry",
"A visitor at $sitename has sent the following information\n
Name: $name
Company Name: $company_name
Telephone Number: $telephone
Email: $email\n
The visitor commented:
------------------------------
$comments
$dropdown
Logged Info :
------------------------------
Using: $HTTP_USER_AGENT
Hostname: $ip
IP address: $REMOTE_ADDR
Date/Time: $date","FROM: steve@digimodus.comm" ) ;
//SEND 2ND MAIL TO ADMIN
mail ("steve@thewaystudio.com","Brookside/About page enquiry",
"A visitor at $sitename has sent the following information\n
Name: $name
Company Name: $company_name
Telephone Number: $telephone
Email: $email\n
The visitor commented:
------------------------------
$comments
$dropdown
Logged Info :
------------------------------
Using: $HTTP_USER_AGENT
Hostname: $ip
IP address: $REMOTE_ADDR
Date/Time: $date","FROM: steve@thewaystudio.com" ) ;
mail ("$email","Thank You for visiting the Mountstar Website",
"Hi $name,\n
Thank you for your interest in Mountstar's products and/or services.\n
We have received your enquiry and will respond within 8 business working hours.
$sitename
$siteaddress","FROM: traders@brooksidemetal.com") ;
//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;
} //
?>
If anyone can help me get to the bottom of this - I will be eternally grateful.
I could always ask the new host to downgrade to the version that worked (PHP 4.4.1) - but I'm not that confident I can get them to do that...
I also tried directing the link in flash code to the mailform on the old server, but this doesn't allow external scripting on a different server - so I need to try and get this mailform working on the new server... any ideas?