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). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

SMS Framework

1,410 sites Security covered Drupal 10–11
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

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

3 tracked projects depend on this one

Activity

Tracked releases
7
Tracked since
Dec 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 7
Maintenance
Dormant

Release Timeline

Releases

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