PHPackages                             kstmostofa/laravel-smpp - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. kstmostofa/laravel-smpp

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kstmostofa/laravel-smpp
=======================

A Laravel package for sending SMS using the SMPP protocol, built on top of the PHP-SMPP library. This package provides a simple and efficient way to integrate SMS functionality into your Laravel applications.

v1.0.4(11mo ago)13599↓44.1%2MITPHPPHP &gt;=8.0

Since Jul 14Pushed 11mo agoCompare

[ Source](https://github.com/kstmostofa/laravel-smpp)[ Packagist](https://packagist.org/packages/kstmostofa/laravel-smpp)[ Docs](https://github.com/kstmostofa/laravel-smpp)[ RSS](/packages/kstmostofa-laravel-smpp/feed)WikiDiscussions main Synced today

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

Laravel SMPP
============

[](#laravel-smpp)

A modern Laravel-friendly wrapper around an SMPP v3.4 client for sending and receiving SMS, with delivery receipt (DLR) support, connection management, and extensible listener patterns.

Features
--------

[](#features)

- Send single or concatenated (long) SMS (GSM 03.38 / UCS-2)
- Request and parse Delivery Receipts (DLRs)
- Receive MO (mobile originated) messages
- Transmitter / Receiver / Transceiver bind modes
- Auto DNS resolution, IPv4 / IPv6 (with force flags)
- Custom timeouts &amp; non-blocking connect with fallback
- Clean Laravel Facade API
- You create your own long‑running DLR listener (example provided)

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

[](#installation)

```
composer require kstmostofa/laravel-smpp
```

Auto-discovery registers the service provider and facade.

Configuration
-------------

[](#configuration)

Publish config:

```
php artisan vendor:publish --provider="Kstmostofa\\LaravelSmpp\\LaravelSmppServiceProvider" --tag="smpp-config"
```

`config/smpp.php`:

```
return [
  'host' => env('SMPP_HOST','127.0.0.1'),
  'port' => env('SMPP_PORT',2775),
  'username' => env('SMPP_USERNAME','smppuser'),
  'password' => env('SMPP_PASSWORD','smpppass'),
  'timeout' => env('SMPP_TIMEOUT',10000),
  'debug' => env('SMPP_DEBUG',false),
];
```

Quick Send Example
------------------

[](#quick-send-example)

```
use Kstmostofa\LaravelSmpp\Facades\LaravelSmpp;
use Kstmostofa\LaravelSmpp\SMPP;

LaravelSmpp::getTransport()->open();
LaravelSmpp::bindTransceiver();
$id = LaravelSmpp::setSender('SENDER', SMPP::TON_ALPHANUMERIC)
    ->setRecipient('1234567890', SMPP::TON_INTERNATIONAL)
    ->requestDLR()
    ->sendSMS('Hello world');
LaravelSmpp::close();
```

Creating Your Own DLR / MO Listener
-----------------------------------

[](#creating-your-own-dlr--mo-listener)

DLRs and MO messages are asynchronous. Implement a custom Artisan command that keeps a persistent bind and loops reading PDUs.

### 1. Make a Command

[](#1-make-a-command)

```
php artisan make:command SmppReceive --command=smpp:receive
```

### 2. Implement Logic (`app/Console/Commands/SmppReceive.php`)

[](#2-implement-logic-appconsolecommandssmppreceivephp)

```
