PHPackages                             phpbook/sms - 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. phpbook/sms

ActiveLibrary

phpbook/sms
===========

PHP SMS Library For NEXMO, PLIVO, TWILIO

1.0.0(7y ago)111MITPHPPHP &gt;=7.1.0

Since Jun 14Pushed 7y agoCompare

[ Source](https://github.com/phpbook-sources/sms)[ Packagist](https://packagist.org/packages/phpbook/sms)[ Docs](https://github.com/phpbook-sources/sms)[ RSS](/packages/phpbook-sms/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

- [About SMS](#about-sms)
- [Composer Install](#composer-install)
- [Declare Configurations](#declare-configurations)
- [Sending SMS](#sending-sms)

### About SMS

[](#about-sms)

- A lightweight SMS PHP library available for NEXMO, PLIVO e TWILIO.

### Composer Install

[](#composer-install)

```
composer require phpbook/sms

```

### Declare Configurations

[](#declare-configurations)

```
/********************************************
 *
 *  Declare Configurations
 *
 * ******************************************/

//Driver connection NEXMO

\PHPBook\SMS\Configuration\SMS::setConnection('main',
	(new \PHPBook\SMS\Configuration\Connection)
		->setName('Main')
		->setExceptionCatcher(function(String $message) {
			//the PHPBook SMS does not throw exceptions, but you can take it here
			//you can store $message in database or something else
		})
		->setDriver((new \PHPBook\SMS\Driver\NEXMO)
			->setKey('key')
			->setSecret('secret')
			->setFrom('00000000000'))
);

//Driver connection PLIVO

\PHPBook\SMS\Configuration\SMS::setConnection('notify',
	(new \PHPBook\SMS\Configuration\Connection)
		->setName('Notify')
		->setExceptionCatcher(function(String $message) {
			//the PHPBook SMS does not throw exceptions, but you can take it here
			//you can store $message in database or something else
		})
		->setDriver((new \PHPBook\SMS\Driver\PLIVO)
			->setKey('key')
			->setToken('token')
			->setFrom('00000000000'))
);

//Driver connection TWILIO

\PHPBook\SMS\Configuration\SMS::setConnection('payments',
	(new \PHPBook\SMS\Configuration\Connection)
		->setName('Payments')
		->setExceptionCatcher(function(String $message) {
			//the PHPBook SMS does not throw exceptions, but you can take it here
			//you can store $message in database or something else
		})
		->setDriver((new \PHPBook\SMS\Driver\TWILIO)
			->setKey('key')
			->setToken('token')
			->setFrom('00000000000'))
);

//Set default connection by connection code

\PHPBook\SMS\Configuration\SMS::setDefault('main');

//Getting connections

$connections = \PHPBook\SMS\Configuration\SMS::getConnections();

foreach($connections as $code => $connection) {

	$connection->getName();

	$connection->getDriver();

};

?>
```

### Sending SMS

[](#sending-sms)

```

	//Connection code is not required if you set default connection

	//make sure the number contain the country code with plus and are code too.

	$boolean = (new \PHPBook\SMS\SMS)
		->setConnectionCode('notify')
		->setMessage(
			(new \PHPBook\SMS\Message)
			->setTo(['+5547999999999', '+5547888888888'])
			->setContent('Hi Jhon')
		)
		->dispatch();

	if ($boolean) {
		//sent
	};

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

2891d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/31623868?v=4)[dz5362](/maintainers/phpbook)[@phpbook](https://github.com/phpbook)

---

Top Contributors

[![phpbook-sources](https://avatars.githubusercontent.com/u/34910819?v=4)](https://github.com/phpbook-sources "phpbook-sources (3 commits)")

---

Tags

phpsmsfastlightweight

### Embed Badge

![Health badge](/badges/phpbook-sms/health.svg)

```
[![Health](https://phpackages.com/badges/phpbook-sms/health.svg)](https://phpackages.com/packages/phpbook-sms)
```

###  Alternatives

[djunehor/laravel-sms

Send SMS from your laravel application

385.3k1](/packages/djunehor-laravel-sms)[amirbagh75/smsir-php

Unofficial sms.ir PHP Package

181.2k](/packages/amirbagh75-smsir-php)

PHPackages © 2026

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