PHPackages                             cyberwizard/sendgrid-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. cyberwizard/sendgrid-mailer

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

cyberwizard/sendgrid-mailer
===========================

A Laravel package for sending 'templated based' emails using SendGrid API KEY

0392PHP

Since Feb 28Pushed 2y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Cyberwizard SendGrid Mailer
===========================

[](#cyberwizard-sendgrid-mailer)

Cyberwizard SendGrid Mailer is a Laravel package designed to simplify the process of sending emails using SendGrid API KEY and Laravel Blade templates. This package is useful when you need to send emails with dynamic content generated from Blade templates while leveraging the power of SendGrid for email delivery.

Why Cyberwizard SendGrid Mailer?
--------------------------------

[](#why-cyberwizard-sendgrid-mailer)

When integrating SendGrid with Laravel applications, you might want to utilize Blade templates for email content generation. However, using Blade templates directly with SendGrid API can be challenging due to compatibility issues. Cyberwizard SendGrid Mailer solves this problem by providing a seamless integration between Laravel Blade templates and SendGrid API.

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

[](#installation)

You can install the package via Composer:

```
composer require cyberwizard/sendgrid-mailer:dev-main
```

Usage
-----

[](#usage)

Once installed, you can use the `sendEmail` method provided by the `Cyberwizard\SendGridMailer\CyberSendGridMailer`class to send emails. Here's how you can use it:

```
use Cyberwizard\SendGridMailer\CyberSendGridMailer;

$subject = 'Your email subject';
$to = 'recipient@example.com';
$fromEmail = 'sender@example.com';
$fromName = 'Sender Name';
$templatePath = 'emails.template'; // Path to your Blade template
$data = [
    'name' => 'John Doe',
    'order_id' => '123456',
    // Add more key-value pairs as needed
];

try {
    $success = CyberSendGridMailer::sendEmail($subject, $to, $fromEmail, $fromName, $templatePath, $data);
    if ($success) {
        // Email sent successfully
    } else {
        // Email sending failed
    }
} catch (\Exception $e) {
    // Handle exception
}
```

Environment Configuration
-------------------------

[](#environment-configuration)

Before using the package, make sure to set your SendGrid API key in your `.env` file:

```
SENDGRID_API_KEY=your-sendgrid-api-key

```

Parameters
----------

[](#parameters)

- `$subject` (string): The subject of the email.
- `$to` (string): The recipient email address.
- `$fromEmail` (string): The sender's email address.
- `$fromName` (string, optional): The sender's name.
- `$templatePath` (string): The path to the email template in your views directory. For example: `'emails.template'`.
- `$data` (array, optional): The data to pass to the email template. For example: ```
    [
        'name' => 'John Doe',
        'order_id' => '123456',
        // Add more key-value pairs as needed
    ]
    ```

License
-------

[](#license)

This package is open-source software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![cyberwizard-dev](https://avatars.githubusercontent.com/u/53139650?v=4)](https://github.com/cyberwizard-dev "cyberwizard-dev (16 commits)")

### Embed Badge

![Health badge](/badges/cyberwizard-sendgrid-mailer/health.svg)

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

###  Alternatives

[tijsverkoyen/css-to-inline-styles

CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.

5.8k505.3M227](/packages/tijsverkoyen-css-to-inline-styles)[minishlink/web-push

Web Push library for PHP

1.9k12.0M53](/packages/minishlink-web-push)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[spatie/url-signer

Generate a url with an expiration date and signature to prevent unauthorized access

4422.3M16](/packages/spatie-url-signer)[mattketmo/email-checker

Throwaway email detection library

2742.0M5](/packages/mattketmo-email-checker)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)

PHPackages © 2026

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