Re: Flash/PHP mail form works fine on another web hosting company but not on webhost4lifes.

PHP

Flash/PHP mail form works fine on another web hosting company but not on webhost4lifes.


lhall 05-26-2007, 9:01 AM

I have created a flash form that calls the php file. The code works perfectly on the hosting company I have used on other projects, but not on webhost4life. Any idea why that might be?

Here is the code:

<?php
// initialize variables for To and Subject fields

$to = 'myemail@hotmail.com';
$subject = 'Feedback from HallRxOnline';

// build message body from variables received in the POST array
$message = 'From: '.$_POST['from']."\n\n";
$message .= 'Email: '.$_POST['email']."\n\n";
$message .= 'Address: '.$_POST['snail']."\n\n";
$message .= 'Phone: '.$_POST['phone']."\n\n";
$message .= 'Comments: '.$_POST['comments'];

// add additional email headers for more user-friendly reply

$additionalHeaders = "From: HallRx feedback<myemail@hotmail.com>\n";
$additionalHeaders .= "Reply-To: $_POST[email]";

// send email message
$OK = mail($to, $subject, $message, $additionalHeaders);
// let Flash know what the result was
if ($OK) {
  echo 'sent=OK';
  }
  else {
  echo 'sent=failed&reason='. urlencode('There seems to be a problem with the server. Please try later.');
  }
?>

Not really asking someone to re write the code for me. Just wondering what it is about this code that webhost4life doesnt like.

I have contacted tech support and they so far haven't figured it out.

Thanks in advance.

Re: Flash/PHP mail form works fine on another web hosting company but not on webhost4lifes.


lhall 05-27-2007, 2:07 PM
Turns out that on this server doesnt like the hotmail account. It works fine on other email accounts. problem solved.
webhost4life.com

Powered by Community Server, by Telligent Systems