Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

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.
}

Activity

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

Releases

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