PHPackages                             laravel-notification-channels/gammu - 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/gammu

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

laravel-notification-channels/gammu
===================================

Gammu Notifications Driver

0.0.8(9y ago)91.3k9[1 issues](https://github.com/laravel-notification-channels/gammu/issues)MITPHPPHP &gt;=5.6.4CI failing

Since Sep 2Pushed 6y ago2 watchersCompare

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

READMEChangelog (8)Dependencies (9)Versions (10)Used By (0)

Gammu Notifications Channel for Laravel 5.3
===========================================

[](#gammu-notifications-channel-for-laravel-53)

[![Latest Version on Packagist](https://camo.githubusercontent.com/cfeebd7a2918634a05a480b6b64a81e4308bff558d64c163360cb4125a3e4652/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f67616d6d752e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laravel-notification-channels/gammu)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/bf84b670d693223e07739901d22a16f46ffff4725e562a596b36d24511102ae6/68747470733a2f2f7472617669732d63692e6f72672f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f67616d6d752e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/laravel-notification-channels/gammu)[![StyleCI](https://camo.githubusercontent.com/bf65e32f513682dc379d908619a5a28f18bce2e42afdbc36da843f99105e8f6b/68747470733a2f2f7374796c6563692e696f2f7265706f732f36373136333930382f736869656c64)](https://styleci.io/repos/67163908)[![SensioLabsInsight](https://camo.githubusercontent.com/04e9f19cf601e41c361d1a1916e5ee20016d66e96296235b6eb9f2d986115ddb/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f63623939373066392d366439362d343431322d623462622d6439336134336461616334302e7376673f7374796c653d666c61742d737175617265)](https://insight.sensiolabs.com/projects/cb9970f9-6d96-4412-b4bb-d93a43daac40)[![Quality Score](https://camo.githubusercontent.com/51e8b8efe26330e40a908d83d28180e27fd4b446e98f57ff23464f8e7435e042/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f67616d6d752e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/laravel-notification-channels/gammu)[![Total Downloads](https://camo.githubusercontent.com/fce8b353cfa7e8ea18f975cf5b721c381b96039180e003850ce2dd26d8ab898e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f67616d6d752e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laravel-notification-channels/gammu)

This package makes it easy to send SMS notifications using [Gammu SMSD](https://wammu.eu/smsd/) with Laravel 5.3.

Channel Deprecated
==================

[](#channel-deprecated)

Please see [this issue](https://github.com/laravel-notification-channels/channels/issues/67) for more infomation.
This channel was deprecated in Oct 2019 due to lack of a maintainer.

If you'd like to take over maintaince, feel free to open an PR to bring the package up to date &amp; we can transfer the package.

Contents
--------

[](#contents)

- [Requirements](#requirements)
- [Installation](#installation)
    - [Setting Up Gammu Service](#setting-up-gammu-service)
        - [Using Native Gammu SMSD Method](#using-native-gammu-smsd-method)
        - [Using Gammu Api](#using-gammu-api)
- [Usage](#usage)
    - [Routing a message](#routing-a-message)
    - [Available Message methods](#available-methods)
- [Changelog](#changelog)
- [Testing](#testing)
- [Security](#security)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

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

[](#requirements)

### Gammu

[](#gammu)

Make sure your Gammu SMSD has properly configured and able to send SMS. For more info to install and configure Gammu SMSD, read the [Gammu SMSD documentation](https://wammu.eu/smsd/).

### Gammu Api

[](#gammu-api)

This is optional if you want to use [Gammu Api](https://github.com/kristiandrucker/gammuApi). Make sure Gammu Api has properly configured and able to send SMS using this API.

Under the hood, Gammu Api is using `gammu sendsms` command line.

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

[](#installation)

You can install the package via composer:

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

You must install the service provider:

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

### Setting Up Gammu Service

[](#setting-up-gammu-service)

There are two methods to send SMS using Gammu. First method is using native Gammu SMSD method, by inserting data directly to Gammu SMSD database. The second method is using Gammu Api.

#### Using Native Gammu SMSD Method

[](#using-native-gammu-smsd-method)

Make sure your Gammu SMSD has properly configured and able to send SMS by inserting data to `outbox` table. The Gammu SMSD and database can be installed in the same machine or in different machine.

Add this settings in `config/services.php` to send SMS using native Gammu method.

```
...
'gammu' => [
    'method' => env('GAMMU_METHOD', 'db'),
    'sender' => env('GAMMU_SENDER', null),
],
...
```

Set the database setting to point Gammu SMSD database in `config/database.php` by adding this settings below.

```
// config/database.php
...
'connections' => [
    ...
    'gammu' => [
        'driver' => 'mysql',
        'host' => env('DB_GAMMU_HOST', 'localhost'),
        'port' => env('DB_GAMMU_PORT', '3306'),
        'database' => env('DB_GAMMU_DATABASE', 'forge'),
        'username' => env('DB_GAMMU_USERNAME', 'forge'),
        'password' => env('DB_GAMMU_PASSWORD', ''),
        'charset' => 'utf8',
        'collation' => 'utf8_unicode_ci',
        'prefix' => '',
        'strict' => true,
        'engine' => null,
    ],
    ...
],
...
```

The sender is the default sender name defined in `phones` table. If it's not set, it will automatically select the first data from `phones` table. This setting is useful if you have multiple sender.

#### Using Gammu Api

[](#using-gammu-api)

Make sure your Gammu Api has properly configured and able to send SMS via it's API. The Gammu Api can be installed in the same machine or in different machine.

Add these settings in `config/services.php` to send SMS.

```
...
'gammu' => [
    'method' => env('GAMMU_METHOD', 'api'),
    'auth' => env('GAMMU_AUTH', 'gammu-api-key'),
    'url' => env('GAMMU_URL', 'http://gammu.api/')
],
...
```

### Using Gammu Api with Redis

[](#using-gammu-api-with-redis)

Make sure, that your Redis server is running and it's able to communicate with your application and gammu api. You are also able to specify `->channel('name-channel')` for using multiple Gammu Api's or have it on a non-default channel.

```
...
'gammu' => [
    'method' => env('GAMMU_METHOD', 'redis')
],
...
```

Usage
-----

[](#usage)

You can now use the channel in your `via()` method inside the Notification class.

```
namespace App\Notifications;

use NotificationChannels\Gammu\GammuChannel;
use NotificationChannels\Gammu\GammuMessage;
use Illuminate\Notifications\Notification;

class SendNotificationToSms extends Notification
{
    public function via($notifiable)
    {
        return [GammuChannel::class];
    }

    public function toGammu($notifiable)
    {
        return (new GammuMessage())
            ->to($phoneNumber)
            ->content($content);
    }
}
```

If you have multiple senders, you can set the sender by passing `sender` method. If sender is not set, it will use one of sender from `phones` table. This method is only available if you're using native Gammu SMSD method.

```
public function toGammu($notifiable)
{
    return (new GammuMessage())
        ->to($phoneNumber)
        ->sender($sender)
        ->content($content);
}
```

### Routing a message

[](#routing-a-message)

You can either send the notification by providing with the phone number of the recipient to the `to($phoneNumber)` method like shown in the above example or add a `routeNotificationForGammu()` method in your notifiable model.

```
...
/**
 * Route notifications for the Gammu channel.
 *
 * @return string
 */
public function routeNotificationForGammu()
{
    return $this->phone;
}
...
```

### Available methods

[](#available-methods)

- `to($phoneNumber)` : `(string)` Receiver phone number. Using international phone number (+62XXXXXXXXXX) format is highly suggested.
- `content($message)` : `(string)` The SMS content. If content length is more than 160 characters, it will be sent as [long SMS](https://en.wikipedia.org/wiki/Concatenated_SMS) automatically.
- `sender($sender)` : `(string)` Phone sender ID set in Gammu `phones` table. This method is only available if you're using native Gammu method.
- `callback($callbackText)` : `(string)` Callback text for [Gammu Api](https://github.com/kristiandrucker/gammuApi) gives you function to pass text and when the Api will send your message it will be sent back to your callback url specified in your Gammu Api. Please setup callback properly on your Gammu Api.
- `channel($redisChannelName)` : `(string)` Channel to publish to Redis. Default channel is `gammu-channel`.

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  or  instead of using the issue tracker.

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

[](#contributing)

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

Credits
-------

[](#credits)

- [Muhammad Zamroni](https://github.com/matriphe)
- [Kristian Drucker](https://github.com/kristiandrucker)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.7% 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 ~18 days

Recently: every ~25 days

Total

7

Last Release

3480d ago

### 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

[![matriphe](https://avatars.githubusercontent.com/u/277262?v=4)](https://github.com/matriphe "matriphe (47 commits)")[![atymic](https://avatars.githubusercontent.com/u/50683531?v=4)](https://github.com/atymic "atymic (3 commits)")[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (2 commits)")[![themsaid](https://avatars.githubusercontent.com/u/4332182?v=4)](https://github.com/themsaid "themsaid (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

87411.3M154](/packages/spatie-laravel-health)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1232.2k16](/packages/fleetbase-core-api)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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