PHPackages                             alaninchika/messenger - 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. alaninchika/messenger

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

alaninchika/messenger
=====================

A PHP library for sending email or sms messages.

1.1.1(7y ago)031MITPHPPHP &gt;=7.0.0

Since Nov 7Pushed 7y agoCompare

[ Source](https://github.com/alaninchika/messenger)[ Packagist](https://packagist.org/packages/alaninchika/messenger)[ Docs](https://github.com/alaninchika/messenger)[ RSS](/packages/alaninchika-messenger/feed)WikiDiscussions master Synced 3d ago

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

Messenger 📨
===========

[](#messenger-)

A PHP library for sending messages.

[![Minimum PHP Version](https://camo.githubusercontent.com/5c3072425e67297c8ef63d17acd2c86a0d2ef324f19249f2280bd7de902f63a2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e302d3838393242462e737667)](https://php.net/)[![License](https://camo.githubusercontent.com/18f2824e4c2f0e3c065b9fe4dc4e567525661a840249afdaf22254fb7e0a2189/68747470733a2f2f706f7365722e707567782e6f72672f616c616e696e6368696b612f6d657373656e6765722f6c6963656e73652e737667)](https://packagist.org/packages/alaninchika/messenger)[![Latest Stable Version](https://camo.githubusercontent.com/e0a4dd2ce9efc21e03aa1d84af04a67db3d803a387d5af582e6e77d55dc9c41f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c616e696e6368696b612f6d657373656e6765722e737667)](https://packagist.org/packages/alaninchika/messenger)[![Total Downloads](https://camo.githubusercontent.com/11e2f6b63ed705ce64ff604908b31ac203b5b854f15591ac1fe9c8d094d3ad0c/68747470733a2f2f706f7365722e707567782e6f72672f616c616e696e6368696b612f6d657373656e6765722f646f776e6c6f6164732e737667)](https://packagist.org/packages/alaninchika/messenger)[![Build Status](https://camo.githubusercontent.com/812e1bf873cb20065b88c72fcdb40cbd316235fcc809a5ed76b835bcb5399769/68747470733a2f2f7472617669732d63692e636f6d2f616c616e696e6368696b612f6d657373656e6765722e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/alaninchika/messenger)[![Code Coverage](https://camo.githubusercontent.com/b21a19d6cc9d9e3d191d769d7819283f4b1c21b14c426b6e25be4b12df9723ac/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616c616e696e6368696b612f6d657373656e6765722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/alaninchika/messenger/?branch=master)[![Code Intelligence Status](https://camo.githubusercontent.com/3e1a335bfe4237aff7add95f75637d0f3680a4de637b3f33e0eb385c7ea88639/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616c616e696e6368696b612f6d657373656e6765722f6261646765732f636f64652d696e74656c6c6967656e63652e7376673f623d6d6173746572)](https://scrutinizer-ci.com/code-intelligence)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/293f3a1fc0f876c5c81c2afa04d8768bc0c595fca5fcd0ec51bb118d07bf1da1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616c616e696e6368696b612f6d657373656e6765722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/alaninchika/messenger/?branch=master)

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

[](#installation)

```
$ composer require alaninchika/messenger

```

Or add to `composer.json`:

```
"require": {
    "alaninchika/messenger": "^1.0.0"
}

```

and then run composer update.

Alternatively you can clone or download the library files.

SMS Configuration (register a provider)
=======================================

[](#sms-configuration-register-a-provider)

```
use Messenger\SMSMessenger;
$smsMessenger = new SMSMessenger();

// Your Account SID and Auth Token from twilio.com/console
$account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
$auth_token = 'your_auth_token';
$twilio_number = "+15017122661";

$twilio = new TwilioSMS($account_sid, $auth_token, $twilio_number);
$smsMessenger->registerSMSProvider('twilio', $twilio);
```

```
use Messenger\SMSMessenger;
$smsMessenger = new SMSMessenger();

$sns_client = new SnsClient([
    'region'  => 'eu-west-1',
    'version' => 'latest',
    'credentials' => [
        'key' => 'AWS_ACCESS_KEY_ID',
        'secret' => 'AWS_SECRET_ACCESS_KEY',
    ]
]);

$sns = new SnsSMS($sns_client, 'SNS_TOPIC');
$smsMessenger->registerSMSProvider('sns', $sns);
```

SMS Usages
----------

[](#sms-usages)

```
// Sending sms message with any registered provider
$result = $smsMessenger->sendMessage('15017122664', 'test message');

// Sending sms message with a specific registered provider
$result = $smsMessenger->sendMessageWith('sns', '15017122662', 'test message');

// Success result
['provider' => 'sns', 'result' => ['message_id' => 'e234-11e8', 'sent' => true]]

// Failed result
['provider' => 'sns', 'result' => ['error' => 'error message', 'sent' => false]]
```

Contribute
----------

[](#contribute)

- [Guide: CONTRIBUTING.md](https://github.com/alaninchika/messenger/blob/master/CONTRIBUTING.md)
- [Issue Tracker: github.com/alaninchika/messenger](https://github.com/alaninchika/messenger/issues)
- [Source Code: github.com/alaninchika/messenger](https://github.com/alaninchika/messenger)

You can find more about contributing in [CONTRIBUTING.md](CONTRIBUTING.md).

License
-------

[](#license)

[MIT License](LICENSE)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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

Every ~6 days

Total

5

Last Release

2722d ago

PHP version history (2 changes)v1.0PHP &gt;=7.0

v1.1PHP &gt;=7.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/cddd543fcde72ad9f097763ae83b8f9c2042641c6a45f01945d1aaaf61920b0d?d=identicon)[alaninchika](/maintainers/alaninchika)

---

Top Contributors

[![alaninchika](https://avatars.githubusercontent.com/u/38652914?v=4)](https://github.com/alaninchika "alaninchika (21 commits)")

---

Tags

awsemailmessengersmssnssns-topictwilioawsemailsmstwilioSNSMessengertext message

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/alaninchika-messenger/health.svg)

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

###  Alternatives

[mageplaza/module-smtp

SMTP Extension for Magento 2 helps the owner of store simply install SMTP (Simple Mail Transfer Protocol) server which transmits the messages into codes or numbers

3015.9M8](/packages/mageplaza-module-smtp)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[ellaisys/aws-cognito

AWS Cognito package that allows Auth and other related features using the AWS SDK for PHP

120220.7k1](/packages/ellaisys-aws-cognito)[simplesoftwareio/simple-sms

Simple-SMS is a package made for Laravel to send/receive (polling/pushing) text messages. Currently supports CalLFire, EZTexting, Email Gateways, FlowRoute, LabsMobile, Mozeo, Nexmo, Plivo, Twilio, and Zenvia

20845.7k5](/packages/simplesoftwareio-simple-sms)[mcfedr/awspushbundle

A set of services to simplify using Aws to send push notifications

40378.6k1](/packages/mcfedr-awspushbundle)[ferdous/laravel-otp-validate

Laravel package for OTP validation with built-in features like retry and resend mechanism. Built in max retry and max resend blocking. OTP/Security Code can be send over SMS or Email of your choice with user-defined template.

7124.4k](/packages/ferdous-laravel-otp-validate)

PHPackages © 2026

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