I want to send bulk sms through javascript request. I tried like the following code but its only sending to first phone number only. I want to send it to the array listed numbers
<script type="text/javascript">
function message_api()
{
var phone_nubmers=['0000000','****','2222','4744'];
for (var i = 0; i < phone_nubmers.length; i++)
{
api(phone_nubmers[i]);
}
}
function api(numbers)
{
var message="test message from ";
var url='http://123.123.123.123:8080/sendsms/bulksms?username=*****-****&password=*********&type=0&dlr=1&destination='+numbers+'&source=******&message='+message;
$.ajax({
url:url,
success: function(data) {
return data;
}
});
}
I tried like this.