Welcome to Webhost4life Forum Sign in | Join | Faq

Print Search
Sort Posts:    
   05-26-2007, 9:01 AM
lhall is not online. Last active: 5/26/2007 11:51:33 PM lhall

Top 200 Posts
Joined on 05-26-2007
Posts 2
Flash/PHP mail form works fine on another web hosting company but not on webhost4lifes.
Reply Quote

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.


   Report 
   05-27-2007, 2:07 PM
lhall is not online. Last active: 5/26/2007 11:51:33 PM lhall

Top 200 Posts
Joined on 05-26-2007
Posts 2
Re: Flash/PHP mail form works fine on another web hosting company but not on webhost4lifes.
Reply Quote
Turns out that on this server doesnt like the hotmail account. It works fine on other email accounts. problem solved.
   Report 
Webhost4life Fo... » General Discuss... » PHP » Flash/PHP mail form works fine on another web hosting company but not on webhost4lifes.

Powered by Community Server, by Telligent Systems