PHPackages                             codewiser/laravel-smscenter-mailer - 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. codewiser/laravel-smscenter-mailer

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

codewiser/laravel-smscenter-mailer
==================================

smsc.ru mailer for Laravel

v1.0.3(1y ago)01091MITPHPPHP ^8.1

Since Aug 15Pushed 1y ago2 watchersCompare

[ Source](https://github.com/C0deWiser/laravel-smscenter-mailer)[ Packagist](https://packagist.org/packages/codewiser/laravel-smscenter-mailer)[ RSS](/packages/codewiser-laravel-smscenter-mailer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (6)Used By (1)

SMS Center mailer for Laravel
=============================

[](#sms-center-mailer-for-laravel)

This package brings one more mailer to your Laravel project —  service.

It supports as personal, as mass sending of emails.

Disclaimer
----------

[](#disclaimer)

This mailer was tested with very specific tasks, so we can not guarantee that it will meet your expectations.

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

[](#installation)

Just install package from composer.

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

[](#configuration)

Add `smsc` section to `mail.mailers` config of your application:

```
'smsc' => [
    'transport' => 'smsc',
    'endpoint'  => env('SMSC_URL', 'https://smsc.ru/sys'),
    'username'  => env('SMSC_LOGIN'),
    'password'  => env('SMSC_PASSWORD'),
    'secret'    => env('SMSC_SECRET'),
],
```

Service will write info/error logs to channel defined in `mail.mailers.log.channel` config.

Finally, set `MAIL_MAILER=smsc` to your `.env` file.

Mass sending
------------

[](#mass-sending)

Compose `Mailable` with more than one recipient and just send it:

```
use Illuminate\Support\Facades\Mail;

$recipients = [
    'foo@example.com',
    'bar@example.com',
];

Mail::send(new CustomMailable($recipients));
```

Personal sending
----------------

[](#personal-sending)

Compose `Mailable` with only one recipient or use `Notification`.

Getting response
----------------

[](#getting-response)

The only way to pass mailer response through facade back to the application (that I found) it to append response as a debug of `\Symfony\Component\Mailer\SentMessage`:

```
use Codewiser\SmsCenterMailer\SmsCenterContract;
use Illuminate\Support\Facades\Mail;
use Illuminate\Mail\Events\MessageSent;

$recipients = [
    'foo@example.com',
    'bar@example.com',
];

Event::listen(MessageSent::class, function (MessageSent $event) {

    $service = app(SmsCenterContract::class);

    // json encoded response
    $response = json_decode($event->sent->getDebug(), true);

    // Die if service respond with error
    $service->throw($response);

    // Keep $response['id'] for later use
});

Mail::send(new CustomMailable($recipients));
```

Message delivery status
-----------------------

[](#message-delivery-status)

After message was sent we may want to check its delivery status.

### Poll

[](#poll)

We may utilize `SmsCenterService` to examine message by its id.

Command:

```
use Codewiser\SmsCenterMailer\MessageStatus;
use Codewiser\SmsCenterMailer\SmsCenterContract;
use Codewiser\SmsCenterMailer\SmsCenterStatusEvent;

/**
 * Execute the console command.
 */
public function handle(SmsCenterContract $provider): void
{
    // For single messages
    $request = $provider->buildSingleStatusPayload(
        message_id: $this->argument('id'),
        route: $this->argument('email')
    );

    // For mass sending
    $request = $provider->buildMailOutStatusPayload(
        message_id: $this->argument('id')
    );

    // Die if service respond with error
    $response = $provider->throw(
        $provider->send($request)
    );

    // Get status
    $status = MessageStatus::tryFrom($response['status']) ?? MessageStatus::undefined;

    // Update status or fire event (see Push)
    event(new SmsCenterStatusEvent($this->argument('id'), $status));
}
```

### Push

[](#push)

SMS Center may [call webhook](https://smsc.ru/api/http/miscellaneous/callback/), if you register it. Ingoing request will be validated and possibly `SmsCenterStatusEvent` will be fired.

Controller:

```
use Codewiser\SmsCenterMailer\SmsCenterContract;
use Illuminate\Http\Request;

public function webhook(Request $request, SmsCenterContract $service) {

    $service->webhookStatus($request->all());

    return response('ok');
}
```

Event listener:

```
use Codewiser\SmsCenterMailer\SmsCenterStatusEvent;

/**
 * Handle the event.
 */
public function handle(SmsCenterStatusEvent $event): void
{
    // Find message by $event->id
    // Update message status with $event->status
}
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance43

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity52

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

Every ~46 days

Total

5

Last Release

448d ago

Major Versions

v0.1 → v1.0.02024-08-15

### Community

Maintainers

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

---

Top Contributors

[![Cellard](https://avatars.githubusercontent.com/u/1220316?v=4)](https://github.com/Cellard "Cellard (5 commits)")

---

Tags

laravelmailersmsclaravelmailmailersmscentersmsc.ru

### Embed Badge

![Health badge](/badges/codewiser-laravel-smscenter-mailer/health.svg)

```
[![Health](https://phpackages.com/badges/codewiser-laravel-smscenter-mailer/health.svg)](https://phpackages.com/packages/codewiser-laravel-smscenter-mailer)
```

###  Alternatives

[vemcogroup/laravel-sparkpost-driver

SparkPost driver to use with Laravel 6.x|7.x|8.x|9.x|10.x

421.7M1](/packages/vemcogroup-laravel-sparkpost-driver)[tkeer/mailbase

Catch laravel emails for local development

10616.8k](/packages/tkeer-mailbase)[juanparati/brevosuite

Complete Brevo integration with Laravel

1010.8k](/packages/juanparati-brevosuite)

PHPackages © 2026

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