我有一個有點問題停止smsgateway,我創建了以下功能:我怎麼能發送任何更多的消息
function sendQuedMessagesByDeviceAndDate($deviceId){
require_once 'php/classes/smsGateway.php';
$smsGateway = new SmsGateway(SMS_GATEWAY_EMAIL, SMS_GATEWAY_PASSWORD);
$result = $smsGateway->getQuedMessages($deviceId);
$arr = $result['response']['result'];
$data = array();
$options = [
'expires_at' => strtotime('+24 hours') // Cancel the message in 24 hours if the message is not yet sent
];
foreach($arr as $res){
if($res['status'] == 'queued' && $res['device_id'] == $deviceId && $res['queued_at'] > 1475452800 && $res['queued_at'] < 1475539200){
array_push($data, $res);
}
}
//$nrs = array();
foreach($data as $mes){
$smsGateway->sendMessageToNumber($mes['contact']['number'], $mes['message'], $deviceId, $options);
}
//return $data;
}
,我已經叫起作用的錯誤5-6次,怎麼能我告訴服務器來自smsgateway停止發送消息,我找不到任何API調用來停止消息,並且來自他們網站的電子郵件是錯誤的,我不能給他們發送任何電子郵件,並且我沒有任何國際撥打電話。