function sms_handle_result in SMS Framework 5
Same name and namespace in other branches
- 6.2 sms.module \sms_handle_result()
- 6 sms.module \sms_handle_result()
- 7 sms.module \sms_handle_result()
1 call to sms_handle_result()
- sms_send in ./
sms.module - Sends a message using the active gateway.
File
- ./
sms.module, line 266 - The core of the SMS Framework. Provides gateway managment and API for sending and receiving SMS messages.
Code
function sms_handle_result($result, $number, $message) {
if ($result['status']) {
return TRUE;
}
else {
$error_message = 'Sending SMS to %number failed.';
$variables['%number'] = $number;
if ($result['message']) {
$error_message .= ' The gateway said ' . $result['message'];
if (!empty($result['variables'])) {
$variables = array_merge($variables, $result['variables']);
}
}
watchdog('sms', $error_message, $variables, WATCHDOG_ERROR);
return FALSE;
}
}