Drupal SMS
SMSC Logo
Send SMSC message form screenshot

This project is not covered by Drupal’s security advisory policy.

About module

Module integrates the SMSC library into Drupal.

About SMSC library

The library allows you to use the following services:

You can send any messages messages (SMS, MMS, Viber, E-mail, Ping / HLR / Flash / Push, etc).

Control your balance and administer any settings (Sender IDs, Administer contacts, Jobs actions, Subclients, and any action from an API).

Features

  • Simple sending from form.
  • Automatic sending from Rules (not work on Drupal 8 yet, waiting for stable Rules release).
  • Programmatically sending.

Dependencies

Installation

Drupal 8

For Drupal 8 only supports installation with Composer!

Just run:

composer require drupal/smsc

After installation, enable the SMSC module.

Drupal 7

  1. Make sure that you have downloaded and installed all dependencies of the module (Libraries API and X Autoload).
  2. Download the lasted SMSC library.
  3. Unzip the file and rename the folder to “smsc”.
  4. Put the folder in a libraries directory sites/all/libraries.
    • Drush users can use the command drush smsc-dl
  5. Enable dependencies and the SMSC modules.

Usage

Set up the SMSC module

After installation, you need to settings up your SMSC account.

(If you do not have an account - create it in a suitable service.)

Go to admin/config/smsc/settings and fill your data.

Simple sending messages

When your account settings are saved, you can send an simple messages from special form.

The form is located at admin/config/smsc/send page.

Just type your message and recipient phone[s].

Automatic sending from Rules

  • Ensure you have installed Rules module.
  • Create new rule / component (or use an existing one). Configure it as you need it.
  • Add action “Send SMSC message” from “SMSC” group, and fill with the message data.

Programmatically sending.

If you need to use SMSC sending in your custom module, just add usage namespaces:

use Drupal\smsc\Smsc\DrupalSmsc;

and call a static method that sends your data:

// Single phone, or coma-separated phones list
$phones = '380001234567'; // International telephone number

// Text message
$message = 'My message';

// Options array. See http://smsc.ua/api/http/
$options = [
  'translit' => TRUE,
];

// Send message
DrupalSmsc::sendSms($phones, $message, $options);

Development status:

Module is under active development.

In the near future, the following opportunities will be added:

  • Integration with SMS Framework
  • Checking balance
  • Checking the cost of messages
  • Message templates
  • Sending multiple messages
  • Other yummy features

My goal is to achieve the maximum capabilities of the platform.

Updating 7.x-1.0 to 7.x-1.1

After update required upload SMSC library to v0.4.1 (or higher)!
For Drush users - run drush smsc-dl

Supporting organizations: 

Project information

Releases