Package

S Ichikawa Laravel Sendgrid Driver

This library adds a 'sendgrid' mail driver to Laravel.

Package

s-ichikawa/laravel-sendgrid-driver

View on GitHub →

Laravel SendGrid Driver Package Summary

The Laravel SendGrid Driver is a robust package designed to integrate SendGrid's Web API with Laravel's mailing capabilities. This package extends Laravel's native mail functionality, allowing developers to leverage SendGrid for email delivery without deviating from Laravel's standard mailing practices.

Main Features:

  • Seamless Integration: Works with Laravel’s native mail functions.
  • Support for SendGrid API: Utilizes SendGrid for sending emails, including advanced features like categories and scheduling.
  • Template Support: Allows the use of SendGrid’s dynamic templates.
  • Custom Endpoints: Ability to set custom endpoints for API requests, useful for routing through proxies or other specific needs.

Installation and Configuration:

For Laravel:
  1. Installation via Composer:

    composer require s-ichikawa/laravel-sendgrid-driver
    

    For Laravel 5.5 and above, service providers are auto-discovered.

  2. Configuration:

    • Set the mail driver in .env:
      MAIL_DRIVER=sendgrid
      SENDGRID_API_KEY='YOUR_SENDGRID_API_KEY'
      
    • Update config/services.php:
      'sendgrid' => [
          'api_key' => env('SENDGRID_API_KEY'),
      ],
      
For Lumen:
  1. Installation via Composer:

    composer require "s-ichikawa/laravel-sendgrid-driver:^4.0"
    
  2. Configuration:

    • Register the service provider in bootstrap/app.php.
    • Configure mail and service details in respective config files.

Usage:

  • Basic Usage: Similar to Laravel's typical mail sending functions but with additional settings for SendGrid specific features such as categories.
  • Using Templates: For using SendGrid templates, specify the template ID and optionally use an empty array in the view method if you don’t need to pass data to a Laravel view.

Endpoint Configuration:

Customize the endpoint in config/services.php if you need to route requests through a custom URL or proxy:

'sendgrid' => [
    'api_key' => env('SENDGRID_API_KEY'),
    'endpoint' => 'https://custom.example.com/send',
],

This package is ideal for developers looking to integrate SendGrid's powerful email delivery services seamlessly into Laravel applications, providing both simplicity and flexibility in managing email communications.

S Ichikawa Laravel Sendgrid Driver Related Articles

Building a Laravel Translation Package – The Database Driver image

Building a Laravel Translation Package – The Database Driver

Read article
Driver-Based Architecture in Spatie's Laravel PDF v2 image

Driver-Based Architecture in Spatie's Laravel PDF v2

Read article
How to get a Websites Favicons in Laravel image

How to get a Websites Favicons in Laravel

Read article
Learn how to use the TNTSearch driver with Laravel Scout image

Learn how to use the TNTSearch driver with Laravel Scout

Read article
Implement a custom driver for Laravel Socialite image

Implement a custom driver for Laravel Socialite

Read article
Memoized Cache Driver in Laravel 12.9 image

Memoized Cache Driver in Laravel 12.9

Read article

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm

Pushsilver

Pushsilver is simple invoicing for freelancers and small studios — send polished invoices, automate reminders, and get paid on time without the bloat.

Pushsilver

Let your users buy domains without leaving your app

If your Laravel app gives users a site, a storefront, or a workspace, they’ll eventually want their own domain. The name.com API lets them search, register, and connect one without leaving your product. It’s a clean REST API, so Laravel’s HTTP client is all you need.

Let your users buy domains without leaving your app

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum