PHPackages                             softbread/yii2-sendcloud - 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. softbread/yii2-sendcloud

ActiveLibaray

softbread/yii2-sendcloud
========================

Provides Yii2 component for SendCloud email service

v0.2.0(8y ago)130BSD-2-ClausePHPPHP &gt;=5.5.0

Since Jan 13Pushed 8y ago1 watchersCompare

[ Source](https://github.com/softbread/yii2-sendcloud)[ Packagist](https://packagist.org/packages/softbread/yii2-sendcloud)[ RSS](/packages/softbread-yii2-sendcloud/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

SendCloud Yii2 integration
==========================

[](#sendcloud-yii2-integration)

[中文文档](README-CN.md)

This extension allows developpers to use [SendCloud](https://sendcloud.net/) as an email transport. Also, you may use this extension to send SMS messages to Chinese cell phones via SendCloud. This work is inspired by [yii2-sendgrid](https://github.com/pgaultier/yii2-sendgrid).

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

[](#installation)

If you use Composer, you can update your composer.json like this :

```
{
    "require": {
        "softbread/yii2-sendcloud": "@dev"
    }
}
```

How to use it
-------------

[](#how-to-use-it)

Add extension to your configuration

```
return [
    //....
    'components' => [
        'mailer' => [
            'class' => 'SendCloud\Mail\Mailer',
            'api_user' => '',
            'api_key'  => ''
        ],
        'sendSms' => [
            'class'  => 'SendCloud\Sms\SendSms',
            'apiUser => '',
            'apiKey  => ''
        ],
    ],
];
```

You can send email via SendCloud as mailer component

```
Yii::$app->mailer->compose('contact/html')
     ->setFrom('from@domain.com')
     ->setTo($form->email)
     ->setSubject($form->subject)
     ->send();
```

For further instructions refer to the [related section in the Yii Definitive Guide](http://www.yiiframework.com/doc-2.0/guide-tutorial-mailing.html)

Also you can use SendCloud template Emails

```
Yii::$app->mailer->compose('contact/html')
     ->setFrom('from@domain.com')
     ->setTo([email1, email2])
     ->setSubject($form->subject)
     ->setTemplateName('revoke-name')
     ->setTemplateVars([
            '%name%' => ['X1', 'X2'],
            '%money%'=> [12.5, 1.9]
        ])
     ->send();
```

To send SMS message:

```
Yii::$app->sendSms->setTo(['13700000000', '13011111111'])
    ->setTemplate('1001')
    ->setVars(['code' => '000111'])
    ->send();
```

For further instruction refer to the [SendCloud SMS API doc](http://www.sendcloud.net/doc/sms/api/)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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 ~7 days

Total

2

Last Release

3030d ago

### Community

Maintainers

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

---

Top Contributors

[![softbread](https://avatars.githubusercontent.com/u/685268?v=4)](https://github.com/softbread "softbread (12 commits)")

---

Tags

email-sendersendcloudsms-messages

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/softbread-yii2-sendcloud/health.svg)

```
[![Health](https://phpackages.com/badges/softbread-yii2-sendcloud/health.svg)](https://phpackages.com/packages/softbread-yii2-sendcloud)
```

###  Alternatives

[tuyakhov/yii2-notifications

The extension provides support for sending notifications across a variety of delivery channels, including mail, SMS, Slack etc. Notifications may also be stored in a database so they may be displayed in your web interface.

6735.5k2](/packages/tuyakhov-yii2-notifications)[zhuravljov/yii2-rest

Yii2 REST Client

1186.2k](/packages/zhuravljov-yii2-rest)[hprose/hprose-yii

Hprose Server for Yii 2

357.1k](/packages/hprose-hprose-yii)

PHPackages © 2026

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