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
- PHP 5.6+
- Composer (Drupal 8 only)
- SMSC library
- Libraries API 2.x module (Drupal 7 only)
- X Autoload module (Drupal 7 only)
- Rules module (optional, if you need to automate actions)
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
- Make sure that you have downloaded and installed all dependencies of the module (Libraries API and X Autoload).
- Download the lasted SMSC library.
- Unzip the file and rename the folder to “smsc”.
- Put the folder in a libraries directory
sites/all/libraries
.- Drush users can use the command
drush smsc-dl
- Drush users can use the command
- 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
Project information
- 25 sites report using this module
- Created by AWD Studio on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
Releases
Development version: 7.x-1.x-dev updated 25 Jul 2019 at 12:53 UTC