Page 1 of 1

weird email issue

Posted: Mon Apr 17, 2006 1:01 am
by alix
I have a script that sends an email to my computer email account.. but what im trying to do is get it to send to my Cell phone. I send the email from outlook to my cell, through the same domain name.. it works fine. However, when i place my script on a differant server, my cell phone recieves the message fine. im confused.. i checked the PHP settings (phpinfo) everything looks the same on both servers.
Here's the script, perhaps someone else knows something i might be able to try.

Code: Select all

<?

       

$HTTP_POST_VARS;
 $result = mysql_query("SELECT * FROM authuser WHERE id = \"$id\" ");
while($myrow = mysql_fetch_assoc($result))
             {
   $number = $myrow['number'];
    $user_carrier = $myrow['user_carrier'];
     }

 $result = mysql_query("SELECT * FROM providers WHERE carrier_name = \"$user_carrier\" ");
while($myrow = mysql_fetch_assoc($result))
             {
   $carrier_address= $myrow['carrier_address'];
   }
  
   $to = "$number$carrier_address";
   $subject = "";
   $message_clean = trim(stripslashes($message));
   @mail($to, $subject, $message_clean, "From:$Emailer<$Emailer>\nReply-to:$Emailer2\nReturn-Path:messages@mydomain.com"); 
  
 //just to see where the message is being sent i through this in there for testing, it still displays the correct email address. 
echo $to;

?>

Posted: Mon Apr 17, 2006 7:53 am
by feyd
Run the following in a new file and tell us the results please.

Code: Select all

<?php

$ve = phpversion();
$os = PHP_OS;
$er = intval(error_reporting());
$rg = (in_array(strtolower(ini_get('register_globals')), array(0, false, '', null, 'off')) ? 'Off' : 'On');
$de = (in_array(strtolower(ini_get('display_errors')), array(0, false, '', null, 'off')) ? 'Off' : 'On');
$so = (in_array(strtolower(ini_get('short_open_tag')), array(0, false, '', null, 'off')) ? 'Off' : 'On');
$eol = (isset($_SERVER['HTTP_HOST']) ? "<br />\n" : "\n");

$ec = array(
   'E_STRICT' => 2048,
   'E_ALL' => 2047,
   'E_USER_NOTICE' => 1024,
   'E_USER_WARNING' => 512,
   'E_USER_ERROR' => 256,
   'E_COMPILE_WARNING' => 128,
   'E_COMPILE_ERROR' => 64,
   'E_CORE_WARNING' => 32,
   'E_CORE_ERROR' => 16,
   'E_NOTICE' => 8,
   'E_PARSE' => 4,
   'E_WARNING' => 2,
   'E_ERROR' => 1,
);

$e = array();
$t = $er;
foreach ($ec as $n => $v)
{
   if (($t & $v) == $v)
   {
      $e[] = $n;
      $t ^= $v;
   }
}
$er = $er . ' (' . implode(' | ', $e) . ')';

echo 'PHP Version: ' . $ve . $eol;
echo 'PHP OS: ' . $os . $eol;
echo 'Error Reporting: ' . $er . $eol;
echo 'Register Globals: ' . $rg . $eol;
echo 'Short Tags: ' . $so . $eol;
echo 'Display Errors: ' . $de . $eol;

?>

Posted: Mon Apr 17, 2006 11:03 am
by John Cartwright
in addition to feyd's post,

@mail($to, $subje...

try removing thr @ on this line, as it may be supressing useful error messages