Forum Moderators: coopster
Here is the code I am using. Thanks in advance
<?
$smsto="717*******@vtext.com";
$subject="Hi!";
$meslength="160";
?>
<? if ($action==send) {
if ($fromemail==""){ $fromemail="My SMS"; }
$bodytext="$message";
$body="$bodytext";
if (strlen($body)>$meslength) {
$newbody = wordwrap($body, $meslength, "<br>");
$barr = explode("<br>", $newbody);
$count=count($barr);
for($i = 0; $i < $count; $i++) {
$i2=$i+1;
$barr[$i]="($i2/$count) \n $barr[$i]";
// echo"$barr[$i]<br>";
mail($smsto, $subject, $barr[$i], "From: $fromemail");
}
}
else
{
mail($smsto, $subject, $body, "From: $fromemail");
}
echo"<p class=text1><i>Thanks, your message have been sent!</i></p>";
}
?>