这是我在 php 中发送短信的代码
if(isset($_POST['frmType'])&& $_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"<br/>".$from;
echo"<br/>".$to;
echo"<br/>".$message;
}
else if ($carrier == "Verizon" || $carrier == "verizon") {
$formatted_number = $to."@vtext.com";
mail("$formatted_number", "", "$message");
echo"<script type=text/javascript>abc();</script>";
}
else if ($carrier == "T-Mobile" || $carrier == "tmobile" || $carrier == "Tmobile") {
$formatted_number = $to."@tomomail.net";
mail("$formatted_number", "", "$message");
echo"<script type=text/javascript>abc();</script>";
}
}
而不是邮件功能,我使用了 5 种类型的邮件功能脚本
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");
但是我的短信仍然没有发送给我的兄弟
我参考以下链接发送短信
http://www.ehow.com/how_7300418_send-sms-using-php.html
http://www.daniweb.com/web-development/php/code/291287/send-text-messages-with-php
http://www.textmessagetool.com/php_sms_script.php
但它仍然无法正常工作。
我不明白究竟是什么问题?
请帮忙
提前致谢