drkylec Posted February 27, 2009 Share Posted February 27, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/147179-help-with-sms-using-http/ Share on other sites More sharing options...
rhodesa Posted February 27, 2009 Share Posted February 27, 2009 the 'From' header with email is purely a suggestion to the recipient. it's the recipient's decision to honor that or not. so my guess is that cell phone carriers don't honor the 'From' header (for security/identity/spam reasons) Quote Link to comment https://forums.phpfreaks.com/topic/147179-help-with-sms-using-http/#findComment-772632 Share on other sites More sharing options...
drkylec Posted February 27, 2009 Author Share Posted February 27, 2009 So what you telling me if I understand you right that it isn't my code and your guess is that it has to do with the cell phone or the provider? Sorry if I seem stupid trying to understand sms better. Quote Link to comment https://forums.phpfreaks.com/topic/147179-help-with-sms-using-http/#findComment-772795 Share on other sites More sharing options...
rhodesa Posted February 27, 2009 Share Posted February 27, 2009 Yes, I am pretty sure you are not allowed to modify the FROM value for a text message. Quote Link to comment https://forums.phpfreaks.com/topic/147179-help-with-sms-using-http/#findComment-772804 Share on other sites More sharing options...
premiso Posted February 27, 2009 Share Posted February 27, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/147179-help-with-sms-using-http/#findComment-772823 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.