The following simple script receives data from a form and sends me an
email. It works fine on my testing machine (xampp for windows).
However, when I upload it to my web host, the script processes but I
do not receive the email. I have used two different email addresses
and both work from the localhost and both fail from the web host. One
email address is at verizon.net and the other at gmail.com. I have
also checked the spam folders and the mail is not there.
I have emailed my webhost and they say that they tried the script and
it worked for them. They claim no problem with the server and suggest
that I check with my software manufacturer.
Web Host PHP version 5.2.5
Localhost PHP version 5.2.6
Any suggestions as to what may be going wrong?
Thanks for your help,
Tom
The Script:
<?php
$ln=$_POST['lname'];
$fn=$_POST['fname'];
$em=$_POST['email'];
$vat=$_POST['vatsim_id'];
$city=$_POST['city'];
$state=$_POST['state'];
$country=$_POST['country'];
$hub=$_POST['req_hub'];
$req_password=$_POST['req_password'];
// Send email to Tom Rushworth with details from pilot application
$mailto="??*****@gmail.com";
$mailsubject="CAA - New Member Application";
$mailbody ="An application to join CAA was completed with the
following information:" . "\n" . "\n";
$mailbody .= "Last name: " . $ln . "\n";
$mailbody .= "First name: " . $fn . "\n";
$mailbody .= "Email Address: " . $em . "\n";
$mailbody .= "VATSIM ID: " . $vat . "\n";
$mailbody .= "City: " . $city . "\n";
$mailbody .= "State: " . $state . "\n";
$mailbody .= "Country: " . $country . "\n";
$mailbody .= "Hub: " . $hub. "\n";
$mailbody .= "Password Requested: " . $req_password . "\n";
mail("$mailto", "$mailsubject", "$mailbody", "CAA NEW MEMBER
ANNOUNCEMENT");
// Retrurn to application
header("Location: pilot_application.php?app_submitted=yes");
?>