You are here

function sms_send in SMS Framework 5

Same name and namespace in other branches
  1. 6.2 sms.module \sms_send()
  2. 6 sms.module \sms_send()
  3. 7 sms.module \sms_send()

Sends a message using the active gateway.

Parameters

$number: The destination number.

$message: The text of the messsage to send.

$options: An array of dditional properties as defined by gateway modules.

5 calls to sms_send()
sms_blast_form_submit in modules/sms_blast/sms_blast.module
sms_sendtophone_form_submit in modules/sms_sendtophone/sms_sendtophone.module
sms_send_form_submit in ./sms.module
Performs a simple send on submit.
sms_user_send in modules/sms_user/sms_user.module
Send a message to a user.
sms_user_send_confirmation in modules/sms_user/sms_user.module

File

./sms.module, line 21
The core of the SMS Framework. Provides gateway managment and API for sending and receiving SMS messages.

Code

function sms_send($number, $message, $options = array()) {
  $gateway = sms_default_gateway();
  foreach (module_implements('sms_send') as $module) {
    $function = $module . '_sms_send';
    $function($number, $message, $options, $gateway);
  }
  if (function_exists($gateway['send'])) {
    $response = $gateway['send']($number, $message, $options);
  }
  return sms_handle_result($response, $number, $message);
}