title: How to send SMS from mail() function in PHP?
body: <p>Here is my code in php for sending sms</p>
  
  <pre><code>   if(isset($_POST['frmType'])&amp;&amp; $_POST['frmType'] == "guest_mail"){
          $from = $_POST['from'];
          $to = $_POST['to'];
          $carrier = $_POST['carrier'];
          $message = stripslashes($_POST['message']);
  
          if ((empty($from)) || (empty($to)) || (empty($message))) {
          echo"&lt;br/&gt;".$from;
          echo"&lt;br/&gt;".$to;
          echo"&lt;br/&gt;".$message;
          }
  
          else if ($carrier == "Verizon" || $carrier == "verizon") {
          $formatted_number = $to."@vtext.com";
          mail("$formatted_number", "", "$message");
  
          echo"&lt;script type=text/javascript&gt;abc();&lt;/script&gt;"; 
          }
  
          else if ($carrier == "T-Mobile" || $carrier == "tmobile" || $carrier == "Tmobile") {
          $formatted_number = $to."@tomomail.net";
          mail("$formatted_number", "", "$message");
  
          echo"&lt;script type=text/javascript&gt;abc();&lt;/script&gt;"; 
          }
      }
  </code></pre>
  
  <p>Instead of mail function i have used 5 type of script for mail function</p>
  
  <pre><code>1. mail('$formatted_number','','$message');
  
  2. mail('$formatted_number','','$message','$from');
  
  3. mail('$formatted_number','$subject','$message','$from');
  
  4. mail('$formatted_number','$subject','$message');
  
  5. mail("$formatted_number", "SMS", "$message"); 
  </code></pre>
  
  <p>But still my SMS is not deliver to my brother</p>
  
  <p>I refer the following link for sending the sms</p>
  
  <p><a href="http://www.ehow.com/how_7300418_send-sms-using-php.html" rel="nofollow">http://www.ehow.com/how_7300418_send-sms-using-php.html</a></p>
  
  <p><a href="http://www.daniweb.com/web-development/php/code/291287/send-text-messages-with-php" rel="nofollow">http://www.daniweb.com/web-development/php/code/291287/send-text-messages-with-php</a></p>
  
  <p><a href="http://www.textmessagetool.com/php_sms_script.php" rel="nofollow">http://www.textmessagetool.com/php_sms_script.php</a></p>
  
  <p>But still it's not working.</p>
  
  <p>I don't understand what exactly problem is? </p>
  
  <p>Please help</p>
  
  <p>Thanks in advance</p>