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). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). 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.

SMS Framework

1,425 sites Security covered
View on drupal.org

This module allows Drupal sites to send SMS messages through various providers. It also supports verifying user phone numbers before sending messages.

SMS Framework is an implementation of Symfony Notifiers' SMS component.

Documentation

Many service integrations are provided, including: 46elks, AllMySms, Amazon SNS, Bandwidth, Brevo, Clickatell, ContactEveryone, Esendex, Fake SMS (for testing), FreeMobile, GatewayApi, GoIP, Infobip, Iqsms, iSendPro, KazInfoTeh, LightSms, LOX24, Mailjet, MessageBird, MessageMedia, Mobyt, Nexmo, Octopush, OrangeSms, OvhCloud, Plivo, Primotexto, Redlink, RingCentral, Sendberry, Sendinblue, Sms77, SimpleTextin, Sinch, Sipgate, SmsSluzba, Smsapi, Smsbox, SmsBiuras, Smsc, SMSense, SMSFactor, SpotHit, Sweego, Telnyx, TurboSms, Twilio, Unifonic, Vonage, Yunpian.

The dispatch of messages, including the mapping of recipients to users is provided by Notifier. Notifier and Messenger provide a way to send messages asynchronously (i.e, queues; outside of the web request). Its also possible to implement your own SMS service, or customise any of the services provided by Symfony by implementing Texter services.

SMS Framework provides other SMS related features, such as

API examples

Sending an SMS:

// Sending to a user/entity.
/** @var \Drupal\sms\PhoneNumber\SmsPhoneNumberInterface $phoneNumberService */
$phoneNumberService = \Drupal::service(\Drupal\sms\PhoneNumber\SmsPhoneNumberInterface::class);
$user = User::load(1);
$notification = (new Notification())->subject('Test message');
$phoneNumberService->send($user, $notification)

Or directly to a phone number:

// Sending to a user/entity.
/** @var \Symfony\Component\Notifier\NotifierInterface $notifier */
$notifier = \Drupal::service(\Symfony\Component\Notifier\NotifierInterface::class);
$recipient = new \Symfony\Component\Notifier\Recipient\Recipient(
  phone: '+123123123',
);
$notification = (new Notification())->subject('Test message');
$notifier->send($notification, $recipient);

Support #

Support is provided in the issue queue or Drupal Slack in the #sms channel.

Installation #

Download the project with composer require drupal/sms. Non-Composer installations are strictly not supported.

Versions

Version 4

New users of the project or users seeking new features should use Version 4. Version 4 is a complete architecture of the project and is a better choice for long term support and technical resilience.

Version 2

The latest version of v2 permits Drupal 10 and 11. v3 and v4 permit Drupal 11 and later only. v2 is unsupported.

Version 2 users should upgrade to V3 for long term support. V3 primarily includes changes to PHP typing and class finalization. There is no long term plan for V3 support as yet, so please evaluate Version 4 at your earliest convenience.

A list of changes for users upgrading from 2 to 3, and new 4 users can be found at https://www.drupal.org/project/smsframework/issues/3492832.

Upgrading from v2/3 to v4

When upgrading from version 2 or 3 to 4, you must uninstall the project first. There is no automatic upgrade path. Gateway integration and configuration will need to be converted to the new services. Entity/user verification carry forward as there are no schema changes. Take a table dump of the sms verification table before uninstalling, then re-import the data.

Integrations

Documentation

Activity

Total releases
5
First release
Dec 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 5
Maintenance
Dormant

Release Timeline

Releases

Version Type Release date
4.0.0-beta1 Pre-release Mar 5, 2025
4.x-dev Dev Feb 25, 2025
3.0.x-dev Dev Dec 10, 2024
2.3.0 Stable Dec 9, 2024
2.4.0 Stable Dec 9, 2024