Jump to content

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 nobody@mywebhost.com 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( "drkylec@axeheadstudio.com", "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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.