You are here

function sms_email_gateway_send in SMS Framework 6

Same name and namespace in other branches
  1. 5 modules/sms_email_gateway/sms_email_gateway.module \sms_email_gateway_send()

Callback for sending messages.

1 string reference to 'sms_email_gateway_send'
sms_email_gateway_gateway_info in modules/sms_email_gateway/sms_email_gateway.module

File

modules/sms_email_gateway/sms_email_gateway.module, line 37

Code

function sms_email_gateway_send($number, $message, $options) {
  $from = !empty($options['from']) ? $options['from'] : NULL;
  $to = $number . '@' . $options['carrier'];
  $params['message'] = $message;
  $message = drupal_mail('sms_email_gateway', 'sms', $to, language_default(), $params, $from);
  if ($message['result']) {
    return array(
      'status' => TRUE,
    );
  }
}