PHPackages                             laravel-notification-channels/cmsms - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. laravel-notification-channels/cmsms

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

laravel-notification-channels/cmsms
===================================

CMSMS notification channel for Laravel 5 and up

4.2.0(2mo ago)924.9k↓51%10MITPHPPHP ^8.2CI failing

Since Sep 1Pushed 2mo ago3 watchersCompare

[ Source](https://github.com/laravel-notification-channels/cmsms)[ Packagist](https://packagist.org/packages/laravel-notification-channels/cmsms)[ Docs](https://github.com/laravel-notification-channels/cmsms)[ Fund](https://enflow.nl/contact)[ RSS](/packages/laravel-notification-channels-cmsms/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (14)Versions (22)Used By (0)

CMSMS notifications channel for Laravel
=======================================

[](#cmsms-notifications-channel-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/54b9aa556fa8dcc186889b6fd1a18cc81b69f3f1f121636b7b732335c4733415/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f636d736d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laravel-notification-channels/cmsms)[![run-tests](https://github.com/laravel-notification-channels/cmsms/actions/workflows/run-tests.yml/badge.svg)](https://github.com/laravel-notification-channels/cmsms/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/96bad4390790e07adc26758ae49d70a06a53d907930932a8109d31ad4516192b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f636d736d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laravel-notification-channels/cmsms)

This package makes it easy to send [CMSMS messages](https://docs.cmtelecom.com/en/api/business-messaging-api/1.0/index) with Laravel.

Contents
--------

[](#contents)

- [Requirements](#requirements)
- [Installation](#installation)
- [Setting up your CMSMS account](#setting-up-your-cmsms-account)
- [Usage](#usage)
    - [Available message methods](#available-message-methods)
- [Changelog](#changelog)
- [Testing](#testing)
- [Security](#security)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

Requirements
------------

[](#requirements)

- [Sign up](https://www.cm.com/register/?app=fbb5f379-99d4-4321-b1cc-607e47e9b20a) for a online sms gateway account
- Find your API key in account settings

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require laravel-notification-channels/cmsms
```

This package will register itself automatically with Laravel 5.5 and up trough Package auto-discovery.

### Manual installation

[](#manual-installation)

You can install the service provider for Laravel 5.4 and below:

```
// config/app.php
'providers' => [
    ...
    NotificationChannels\Cmsms\CmsmsServiceProvider::class,
],
```

Setting up your CMSMS account
-----------------------------

[](#setting-up-your-cmsms-account)

Add your CMSMS Product Token and default originator (name or number of sender) to your `config/services.php`:

```
// config/services.php
...
'cmsms' => [
    'product_token' => env('CMSMS_PRODUCT_TOKEN'),
    'originator' => env('CMSMS_ORIGINATOR'),
],
...
```

Notice: The originator can contain a maximum of 11 alphanumeric characters.

Usage
-----

[](#usage)

Now you can use the channel in your `via()` method inside the notification:

```
use NotificationChannels\Cmsms\CmsmsMessage;
use Illuminate\Notifications\Notification;

class VpsServerOrdered extends Notification
{
    public function via($notifiable)
    {
        return ['cmsms'];
    }

    public function toCmsms($notifiable)
    {
        return CmsmsMessage::create("Your {$notifiable->service} was ordered!");
    }
}
```

In order to let your Notification know which phone numer you are targeting, add the `routeNotificationForCmsms` method to your Notifiable model.

**Important note**: CMCMS requires the recipients phone number to be in international format. For instance: 0031612345678

```
public function routeNotificationForCmsms()
{
    return '0031612345678';
}
```

### Available message methods

[](#available-message-methods)

- `body('')`: Accepts a string value for the message body.
- `originator('')`: Accepts a string value between 1 and 11 characters, used as the message sender name.
- `reference('')`: Accepts a string value for your message reference. This information will be returned in a status report so you can match the message and it's status. Restrictions: 1 - 32 alphanumeric characters. Reference will not work for demo accounts.
- `encodingDetectionType('')`: Read about encoding detection here:
- `multipart($minimum, $maximum)`: Accepts a 0 to 8 integer range which allows multipart messages. See the [documentation from CM](https://dashboard.onlinesmsgateway.com/docs#send-a-message-multipart) for more information.

### Available events

[](#available-events)

- `SMSSentSuccessfullyEvent`: This event will be fired after the message was sent. The event will contain the payload we have sent to CM.
- `SMSSendingFailedEvent`: This event will be fired if the message was not sent. The event will contain the response body we received from CM.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Michel Bardelmeijer](https://github.com/mbardelmeijer)
- [All Contributors](../../contributors)

Special thanks to [Peter Steenbergen](http://petericebear.github.io) for the MessageBird template from where this is mostly based on.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

60

—

FairBetter than 98% of packages

Maintenance84

Actively maintained with recent releases

Popularity36

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity85

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 60.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~206 days

Recently: every ~187 days

Total

18

Last Release

85d ago

Major Versions

0.0.5 → 1.0.02017-06-01

1.0.0 → 2.0.02019-09-14

2.3.0 → 3.0.02022-07-05

3.4.0 → 4.0.02025-01-29

PHP version history (5 changes)0.0.1PHP &gt;=5.6.4

1.0.0PHP ^7.0

2.0.0PHP ^7.2

3.0.0PHP ^8.1

3.4.0PHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20937037?v=4)[Laravel Notification Channels](/maintainers/laravel-notification-channels)[@laravel-notification-channels](https://github.com/laravel-notification-channels)

---

Top Contributors

[![mbardelmeijer](https://avatars.githubusercontent.com/u/1583095?v=4)](https://github.com/mbardelmeijer "mbardelmeijer (53 commits)")[![marventhieme](https://avatars.githubusercontent.com/u/53627227?v=4)](https://github.com/marventhieme "marventhieme (13 commits)")[![mpociot](https://avatars.githubusercontent.com/u/804684?v=4)](https://github.com/mpociot "mpociot (7 commits)")[![charleskoko](https://avatars.githubusercontent.com/u/55494612?v=4)](https://github.com/charleskoko "charleskoko (5 commits)")[![NukeJS](https://avatars.githubusercontent.com/u/32038256?v=4)](https://github.com/NukeJS "NukeJS (5 commits)")[![ziming](https://avatars.githubusercontent.com/u/679513?v=4)](https://github.com/ziming "ziming (2 commits)")[![emielmolenaar](https://avatars.githubusercontent.com/u/2470795?v=4)](https://github.com/emielmolenaar "emielmolenaar (1 commits)")[![atymic](https://avatars.githubusercontent.com/u/50683531?v=4)](https://github.com/atymic "atymic (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/laravel-notification-channels-cmsms/health.svg)

```
[![Health](https://phpackages.com/badges/laravel-notification-channels-cmsms/health.svg)](https://phpackages.com/packages/laravel-notification-channels-cmsms)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M164](/packages/spatie-laravel-health)[illuminate/http

The Illuminate Http package.

11937.9M6.9k](/packages/illuminate-http)[laravel-notification-channels/expo

Expo Notifications Channel for Laravel

67628.6k1](/packages/laravel-notification-channels-expo)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1235.9k20](/packages/fleetbase-core-api)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
