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

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

rahulk-k/yii2-sendgrid
======================

to send email using sendgrid

1.0.0(6y ago)16MITPHP

Since Oct 20Pushed 5y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (2)Versions (2)Used By (0)

Yii2 Sendgrid Extension
=======================

[](#yii2-sendgrid-extension)

Sendgrid Mailer for Yii 2

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist rahulk-k/yii2-sendgrid "*"

```

or add

```
"rahulk-k/yii2-sendgrid": "~1.0"

```

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' => 'rahul\sendgrid\Mailer',
		'username' => 'your_user_name',
		'password' => 'your password here',
                'token'    => 'your token',
		//'viewPath' => '@app/views/mail', // your view path here
	],
	...
],
```

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

```
Yii::$app->sendgrid->compose('contact/html', ['contactForm' => $form])
->setFrom(['from@domain.com'=>'John Due'])
	->setTo($form->email)
	->setSubject($form->subject)
	->send();
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

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

2396d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10880236?v=4)[Rahul K](/maintainers/rahulk-k)[@rahulk-k](https://github.com/rahulk-k)

---

Top Contributors

[![rahulk-k](https://avatars.githubusercontent.com/u/10880236?v=4)](https://github.com/rahulk-k "rahulk-k (16 commits)")

---

Tags

yii2extension

### Embed Badge

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

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

###  Alternatives

[nterms/yii2-mailqueue

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

87129.2k2](/packages/nterms-yii2-mailqueue)[nickcv/yii2-mandrill

Mandrill Api Integration for Yii2

29554.2k2](/packages/nickcv-yii2-mandrill)[odaialali/yii2-toastr

This is the Toastr extension for Yii 2. It encapsulates Toastr plugin in terms of Yii widgets, and makes ajax notification easy to implement.

1486.3k](/packages/odaialali-yii2-toastr)[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)
