Jump to content

Help with sms using HTTP


drkylec

Recommended Posts

I have the sending of my message form the browser to the cell phone working the only problem I am having is that when i send the message it will not display the e-mail from the user i get [email protected] i will post my code if anyone can help me that would be great thank you. On an added note i have it where you can only access the page if you are logged in to my site so i need to find out why it wont pull the email form my database and put it into the from.

 

<?php

include("database.php");

include("constants.php");

 

$from = $_POST['from'];

$to = $_POST['to'];

$carrier = $_POST['carrier'];

$message = stripslashes($_POST['message']);

 

$Email = $_POST['Email'];

// Collect other variables from POST here

mail($PhoneNumber, $Subject, $Message, 'From: ' . $Email);

 

if ((empty($from)) || (empty($to)) || (empty($message))) {

header ("Location: sms_error.php");

}

else if ($carrier == "verizon") {

$formatted_number = $to."@vtext.com";

mail("$formatted_number", "Axe Head Studio", "$message");

// Currently, the subject is set to "SMS". Feel free to change this.

 

header ("Location: sms_success.php");

}

 

else if ($carrier == "tmobile") {

$formatted_number = $to."@tomomail.net";

mail("$formatted_number", "Axe Head Studio", "$message");

 

header ("Location: sms_success.php");

}

 

else if ($carrier == "sprint") {

$formatted_number = $to."@messaging.sprintpcs.com";

mail("$formatted_number", "Axe Head Studio", "$message");

 

header ("Location: sms_success.php");

}

 

else if ($carrier == "att") {

$formatted_number = $to."@txt.att.net";

mail("$formatted_number", "Axe Head Studio", "$message");

header ("Location: sms_success.php");

}

 

else if ($carrier == "virgin") {

$formatted_number = $to."@vmobl.com";

mail("$formatted_number", "Axe Head Studio", "$message");

 

header ("Location: sms_success.php");

}

?>

 

 

<?php

  $email = $_REQUEST['email'] ;

  $message = $_REQUEST['message'] ;

 

  mail( "[email protected]", "Feedback Form Results",

  $message, "From: $email" );

  header( "Location: http://www.axeheadstudio.com/sms_success.php" );

?>

 

-drkylec

http://www.axeheadstudio.com/

http://www.youtube.com/axeheadstudio

Link to comment
https://forums.phpfreaks.com/topic/147179-help-with-sms-using-http/
Share on other sites

Yes, I am pretty sure you are not allowed to modify the FROM value for a text message.

 

To support this, whenever you get a SMS from an email (I can go in my email and write one) It rarely, if ever, states the actual email. It usually has some random numbers which the server stores for x amount of time and if you reply to it, they route it back using that.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.