I was wondering if anyone has ever seen, heard, or knows about any scripts, tutorials or information on sending a Text Message to a phone via an HTML Form/PHP. I have a simple script already, just your basic mail script that sends a text message to a user specified phone number. As of now you have to manually change which carrier. The message goes through except the FROM always says the default email address of the server and not the one I want to use. Like the one I am hard coding isn’t passing through.
Any help or direction on understanding this better would be of great help.
Code I have as of now below:
[php]<? $phone = $_POST['phone']; $msg = stripslashes($_POST['msg']); //$to = $phone . "@messaging.sprintpcs.com"; //$to = $phone . "@message.Alltel.com"; $headers = "Reply-To: firstname.lastname@example.org"; $to = $phone . "@vtext.com"; $subject = "Online Request"; mail($to, $subject, $msg, $headers); echo "You text message has been sent successfully!" ?>
Serveral Header Stuff. The from always comes up from the defualt address of the server and not who I put in.
Note - I stripped out all the extra stuff. This is just where the problem occurs.