I'm trying to write a form to to send text messages to cell phones. Everything works fine except the phone sees it as coming from localhost@root OR whatever I specify in the php.ini file. (it is a windows box). I am using the following code:
$to = "$number@tmomail.net";
$subject = "test";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=utf-8\r\n";
$headers .= "From: $number@tmomail.net <$number@tmomail.net>\r\n";
mail($to, $subject, $txtMessage, $headers);
Now, when I send this mail to a regular email client such as outlook, it shows up as coming from $number@tmomail.net (correct as it should be) However, when I send this to a cell phone, it shows up as originating from localhost@root OR whatever i specify in the php.ini file. This makes it so that the phone cannot reply to the sender.
When I send the phone a text from Yahoo, it shows up as address@yahoo.com, so I know the phone is capable of recieving headers.
Any ideas?? Any help is appreciated.
Thanks! -Jon