Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

This module integrates Drupal with the Fast2sms service for sending text messages. It allows you to easily send SMS notifications from your Drupal site by configuring your Fast2sms API key.

This module provides integration between Fast2sms and SMS Framework.

Maintainers of this module are not affiliated with the Fast2sms Group.

There are no external dependencies or special requirements, it's simple installation and configuration has only adding api key from Fast2sms.

Drupal 7

$mobile_number = 'YOUR NUMBER';
$sms_template = 'This is test Message.';
// You need to have fast2sms as default as send it in options
$email_send = sms_send($mobile_number, $sms_template);

Drupal 8 & 9

$sms_service = \Drupal::service('sms.provider');
// Next two lines are optional
$gateway = \Drupal\sms\Entity\SmsGateway::load('fast2sms'); // Name of your gateway you give in config.
$gateway->setSkipQueue(1);
$sms = (new \Drupal\sms\Message\SmsMessage())
  ->setMessage('This is a test message') // Set the message.
  ->addRecipient('YOUR NUMBER') // Set recipient phone number
  ->setGateway($gateway)  // This is optional
  ->setDirection(\Drupal\sms\Direction::OUTGOING);
try {
  $sms_service->queue($sms);
}
catch (\Drupal\sms\Exception\RecipientRouteException $e) {
  // Thrown if no gateway could be determined for the message.
}
catch (\Exception $e) {
  // Other exceptions can be thrown.
}

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Feb 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Core Release date
8.x-1.0-alpha3 Pre-release 8–11 Feb 18, 2025