PHPackages                             price2performance/sendgrid-nette - 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. [API Development](/categories/api)
4. /
5. price2performance/sendgrid-nette

ActiveLibrary[API Development](/categories/api)

price2performance/sendgrid-nette
================================

Sendgrid integration for Nette.

v2.1.0(9mo ago)12.9k↓66.7%2BSD-3-ClausePHPPHP &gt;=7.1CI passing

Since Jun 3Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/price2performance/sendgrid-nette)[ Packagist](https://packagist.org/packages/price2performance/sendgrid-nette)[ RSS](/packages/price2performance-sendgrid-nette/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (8)Versions (10)Used By (0)

sendgrid-nette
==============

[](#sendgrid-nette)

Sendgrid integration for Nette.

[![Github badge](https://github.com/price2performance/sendgrid-nette/workflows/build/badge.svg)](https://github.com/price2performance/sendgrid-nette/actions) [![Build Status](https://camo.githubusercontent.com/3e99aa91a87c16a96ea02bf70e3f39a0a309df1fd4a31939f031c9f2da317748/68747470733a2f2f7472617669732d63692e6f72672f707269636532706572666f726d616e63652f73656e64677269642d6e657474652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/price2performance/sendgrid-nette) [![Coverage Status](https://camo.githubusercontent.com/64f1a508cba6f3a9c8b0726f688739e04454ea4f15e710a2565e3935c810a16d/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f707269636532706572666f726d616e63652f73656e64677269642d6e657474652f62616467652e737667)](https://coveralls.io/r/price2performance/sendgrid-nette)

Install
-------

[](#install)

```
composer require price2performance/sendgrid-nette

```

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

[](#configuration)

In config add:

```
extension:
    sendgrid: Price2Performance\SendGrid\DI\SendGridExtension

sendgrid:
    key: 'SECRET_KEY'

```

Usage
-----

[](#usage)

To make any API call to SendGrid, just inject the SendGrid class to your presenter:

```
    /** @var SendGrid @inject */
    public $sendgrid;

    public function actionDefault()
    {
        // CALL suppression/bounces
        try {
            $response = $this->sendgrid->client->suppression()->bounces()->get();
            print $response->statusCode() . "\n";
            print_r($response->headers());
            print $response->body() . "\n";
        } catch (Exception $e) {
            echo 'Caught exception: '.  $e->getMessage(). "\n";
        }
    }

```

To send an email via `SendGrid`, just inject `Price2Performance\SendGrid\SendGridMailer` to your presenter:

```
    /** @var \Price2Performance\SendGrid\SendGridMailer @inject */
    public $mailer;

    protected function sendMail() {

        $message = new \Nette\Mail\Message();
        $message->addFrom('sender@example.com', 'Sender Name');
        $message->addTo('example@example.com');
        $message->setSubject('TEST SUBJECT');
        $message->setBody('TEST BODY');

        $this->mailer->send($message);

        /** @var \SendGrid\Response $response */
        $response = $this->mailer->getLastResponse();   // optional, for error logging
    }

```

Calling `getLastResponse()` on `SendGridMailer` gets you `SendGrid\Response` of the last `send()` call. You can use it to log errors.

Versions
--------

[](#versions)

VersionNetteSendGrid APIPHP2.0^3.0^7.47.1 - 8.32.1^3.0 or ^4.0^8.17.1 - 8.4

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance56

Moderate activity, may be stable

Popularity22

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 73.2% 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 ~418 days

Recently: every ~481 days

Total

9

Last Release

292d ago

Major Versions

v1.1.1 → v2.0.0-alpha2020-04-20

PHP version history (2 changes)v1.0.0PHP &gt;=5.3.0

v2.0.0-alphaPHP &gt;=7.1

### Community

Maintainers

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

---

Top Contributors

[![haltuf](https://avatars.githubusercontent.com/u/325759?v=4)](https://github.com/haltuf "haltuf (30 commits)")[![honzagula](https://avatars.githubusercontent.com/u/15079308?v=4)](https://github.com/honzagula "honzagula (6 commits)")[![xpavp03](https://avatars.githubusercontent.com/u/853656?v=4)](https://github.com/xpavp03 "xpavp03 (3 commits)")[![JanMikes](https://avatars.githubusercontent.com/u/3995003?v=4)](https://github.com/JanMikes "JanMikes (2 commits)")

---

Tags

apinettesendgrid

### Embed Badge

![Health badge](/badges/price2performance-sendgrid-nette/health.svg)

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

###  Alternatives

[apigen/apigen

PHP source code API generator.

2.2k627.9k225](/packages/apigen-apigen)

PHPackages © 2026

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