PHPackages                             xeois/yii2-sendgrid - 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. xeois/yii2-sendgrid

ActiveYii2-extension[Mail &amp; Notifications](/categories/mail)

xeois/yii2-sendgrid
===================

Sendgrid Mailer for Yii 2

4.0.6(6y ago)023MITPHP

Since Nov 24Pushed 6y agoCompare

[ Source](https://github.com/xeois/yii2-sendgrid)[ Packagist](https://packagist.org/packages/xeois/yii2-sendgrid)[ RSS](/packages/xeois-yii2-sendgrid/feed)WikiDiscussions master Synced yesterday

READMEChangelog (7)Dependencies (3)Versions (24)Used By (0)

Yii 2 shershennm SendGrid
=========================

[](#yii-2-shershennm-sendgrid)

Sendgrid Mailer for Yii 2

> forked from [bryglen/yii2-sendgrid](https://github.com/bryglen/yii2-sendgrid.git)

**3.1.0 update**

Methods which returned `\SendGrid\Mail\EmailAddress` or array with this type, now returns plain email string or `['email' => 'name']` array or array with this values.

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist xeois/yii2-sendgrid "~4"

```

or add

```
"xeois/yii2-sendgrid": "~4"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

To use Mailer, you should configure it in the application configuration like the following,

```
'components' => [
	...
	'sendGrid' => [
		'class' => 'xeois\sendgrid\Mailer',
		'apiKey' => 'your api key',
	]
	...
],
```

To send an email, you may use the following code:

```
$sendGrid = Yii::$app->sendGrid;
$message = $sendGrid->compose('contact/html', ['contactForm' => $form])
$message->setFrom('from@domain.com')
	->setTo($form->email)
	->setSubject($form->subject)
	->send($sendGrid);
	//also you can use sendgrid substitutions
	->setSendGridSubstitution('template id', [
		':var1' => 'var1value',
		':var2' => 'var2value',
	]);
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 51.9% 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 ~93 days

Recently: every ~11 days

Total

22

Last Release

2219d ago

Major Versions

1.1.4 → 2.0.02015-12-21

2.0.2 → 3.0.02018-12-06

3.1.1 → 4.0.12020-03-02

### Community

Maintainers

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

---

Top Contributors

[![shershennm](https://avatars.githubusercontent.com/u/1130311?v=4)](https://github.com/shershennm "shershennm (27 commits)")[![bryglen](https://avatars.githubusercontent.com/u/875604?v=4)](https://github.com/bryglen "bryglen (12 commits)")[![vikramsra](https://avatars.githubusercontent.com/u/1715752?v=4)](https://github.com/vikramsra "vikramsra (10 commits)")[![p1umbum](https://avatars.githubusercontent.com/u/24696989?v=4)](https://github.com/p1umbum "p1umbum (2 commits)")[![thiagotalma](https://avatars.githubusercontent.com/u/612578?v=4)](https://github.com/thiagotalma "thiagotalma (1 commits)")

---

Tags

sendgridyii2extensionshershennm

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/xeois-yii2-sendgrid/health.svg)

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

###  Alternatives

[nterms/yii2-mailqueue

Email queue component for yii2 that works with yii2-swiftmailer.

87129.2k2](/packages/nterms-yii2-mailqueue)[bryglen/yii2-sendgrid

Sendgrid Mailer for Yii 2

1353.5k](/packages/bryglen-yii2-sendgrid)

PHPackages © 2026

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