You are here

function messaging_sms_send_msg in Messaging 6

Same name and namespace in other branches
  1. 5 messaging_sms/messaging_sms.module \messaging_sms_send_msg()
  2. 6.4 messaging_sms/messaging_sms.module \messaging_sms_send_msg()
  3. 6.2 messaging_sms/messaging_sms.module \messaging_sms_send_msg()
  4. 6.3 messaging_sms/messaging_sms.module \messaging_sms_send_msg()

Send message to multiple destinations

This is just a wrapper for sms_send()

1 string reference to 'messaging_sms_send_msg'
messaging_sms_messaging in messaging_sms/messaging_sms.module
Implementation of hook_messaging

File

messaging_sms/messaging_sms.module, line 58
SMS Messsaging using SMS Framework. Messaging method plug-in

Code

function messaging_sms_send_msg($destination, $message, $params = array()) {
  if (!empty($destination['number']) && !empty($destination['gateway'])) {
    $text = $message->subject;
    $text = !empty($text) && !empty($message->body) ? ' ' : '';
    $text .= $message->body;
    return sms_send($destination['number'], $text, $destination['gateway']);
  }
  else {
    return FALSE;
  }
}